FairRoot/PandaRoot
Functions
FairEvtFilterOnSingleParticleCounts.cxx File Reference
#include "FairEvtFilterOnSingleParticleCounts.h"
#include "TParticlePDG.h"

Go to the source code of this file.

Functions

std::ostreamoperator<< (std::ostream &os, const std::vector< Int_t > &v)
 
std::ostreamoperator<< (std::ostream &os, const std::vector< std::pair< Double_t, Double_t > > &vpair)
 
std::ostreamoperator<< (std::ostream &os, const std::vector< std::pair< Int_t, Int_t > > &vpair)
 
std::ostreamoperator<< (std::ostream &os, const std::map< Int_t, std::vector< Int_t > > &pdgGroupId)
 

Function Documentation

std::ostream& operator<< ( std::ostream os,
const std::vector< Int_t > &  v 
)

Definition at line 8 of file FairEvtFilterOnSingleParticleCounts.cxx.

References v.

9 {
10  os << "(";
11  Int_t lastIdx = v.size()-1;
12  if(lastIdx < 0){
13  os << ")" ;
14  return os;
15  }
16 
17  for (Int_t iVec = 0; iVec < lastIdx; ++iVec){
18  os << v[iVec] << ", ";
19  }
20  os << v[lastIdx] << ")";
21  return os;
22 }
__m128 v
Definition: P4_F32vec4.h:4
std::ostream& operator<< ( std::ostream os,
const std::vector< std::pair< Double_t, Double_t > > &  vpair 
)

Definition at line 26 of file FairEvtFilterOnSingleParticleCounts.cxx.

27 {
28  os << "( ";
29  Int_t lastIdx = vpair.size()-1;
30  if(vpair.size() == 0){
31  os << ")" ;
32  return os;
33  }
34 
35  for (Int_t iVec = 0; iVec < lastIdx; ++iVec){
36  os << "{";
37  os << vpair[iVec].first << ", ";
38  os << vpair[iVec].second;
39  os << "},";
40  }
41  os << "{";
42  os << vpair[lastIdx].first << ", ";
43  os << vpair[lastIdx].second;
44  os << "} )";
45  return os;
46 }
std::ostream& operator<< ( std::ostream os,
const std::vector< std::pair< Int_t, Int_t > > &  vpair 
)

Definition at line 49 of file FairEvtFilterOnSingleParticleCounts.cxx.

50 {
51  os << "( ";
52  Int_t lastIdx = vpair.size()-1;
53  if(vpair.size() == 0){
54  os << ")" ;
55  return os;
56  }
57 
58  for (Int_t iVec = 0; iVec < lastIdx; ++iVec){
59  os << "{";
60  os << vpair[iVec].first << ", ";
61  os << vpair[iVec].second;
62  os << "},";
63  }
64  os << "{";
65  os << vpair[lastIdx].first << ", ";
66  os << vpair[lastIdx].second;
67  os << "} )";
68  return os;
69 }
std::ostream& operator<< ( std::ostream os,
const std::map< Int_t, std::vector< Int_t > > &  pdgGroupId 
)

Definition at line 72 of file FairEvtFilterOnSingleParticleCounts.cxx.

References map.

73 {
74  if(pdgGroupId.begin() == pdgGroupId.end()){
75  os << "( , [ ] )";
76  return os;
77  }
78  for (std::map<Int_t,std::vector<Int_t> >::const_iterator iPdgGroupId = pdgGroupId.begin(); iPdgGroupId != pdgGroupId.end(); ++iPdgGroupId){
79  os << "( "<< iPdgGroupId->first << ", [";
80  os << iPdgGroupId->second;
81  os << "] )";
82  }
83  return os;
84 }
PndTransMap * map
Definition: sim_emc_apd.C:99