ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
lbninfo Class Reference
Collaboration diagram for lbninfo:

Public Member Functions

 lbninfo ()
 
void makestreammap ()
 
std::string streameventstring ()
 

Public Attributes

std::map< int, int > wantedmap
 
std::map< int, std::vector< int > > streammap
 
int currentevent
 
int nevt
 
int magic
 
int noalgps
 
int j40ps
 
std::vector< int > trigmap
 
std::vector< int > trigevt
 
int written_j40
 
int written_no_j40
 

Detailed Description

Definition at line 29 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

Constructor & Destructor Documentation

◆ lbninfo()

lbninfo::lbninfo ( )
inline

Definition at line 31 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

31 : currentevent(0),nevt(0),magic(0),noalgps(-1),j40ps(-1),written_j40(0),written_no_j40(0) {}

Member Function Documentation

◆ makestreammap()

void lbninfo::makestreammap ( )
inline

Definition at line 44 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

44  {
45  for (std::map<int,int>::const_iterator s=wantedmap.begin(); s!=wantedmap.end(); ++s){
46  int stream=s->first, wanted=s->second;
47  for (int e=0; e<wanted; ++e){
48  int chosen_evt = myrand.Integer(nevt);//chose a random event in the lbn
49  if (noalgps>0){
50  //check if the chosen event is a j40
51  while (trigmap[chosen_evt]==1){
52  //skip it, with probability j40ps/noalgps
53  assert(noalgps>=j40ps);
54  double psratio = (double)j40ps/(double)noalgps;
55  if (myrand.Uniform(1.0)>psratio){
56  //skip it, choose another random event
57  chosen_evt = myrand.Integer(nevt);
58  }
59  else {
60  //we'll keep it
61  break;
62  }
63  }
64  }//using trigmap
65  streammap[chosen_evt].push_back(stream);
66  }
67  }
68  }

◆ streameventstring()

std::string lbninfo::streameventstring ( )
inline

Definition at line 71 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

71  {
72  std::ostringstream out;
73  for (std::map<int, std::vector<int> >::const_iterator s=streammap.begin(); s!=streammap.end(); ++s){
74  out<<"\nevent "<<s->first<<" goes to stream(s)";
75  for (unsigned int e=0; e<s->second.size(); ++e){
76  out<<" "<<s->second[e];
77  }
78  }
79  return out.str();
80  }

Member Data Documentation

◆ currentevent

int lbninfo::currentevent

Definition at line 35 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ j40ps

int lbninfo::j40ps

Definition at line 38 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ magic

int lbninfo::magic

Definition at line 36 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ nevt

int lbninfo::nevt

Definition at line 35 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ noalgps

int lbninfo::noalgps

Definition at line 37 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ streammap

std::map<int, std::vector<int> > lbninfo::streammap

Definition at line 34 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ trigevt

std::vector<int> lbninfo::trigevt

Definition at line 40 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ trigmap

std::vector<int> lbninfo::trigmap

Definition at line 39 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ wantedmap

std::map<int,int> lbninfo::wantedmap

Definition at line 33 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ written_j40

int lbninfo::written_j40

Definition at line 41 of file ByteStreamMultipleOutputStreamCopyTool.cxx.

◆ written_no_j40

int lbninfo::written_no_j40

Definition at line 41 of file ByteStreamMultipleOutputStreamCopyTool.cxx.


The documentation for this class was generated from the following file:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
lbninfo::streammap
std::map< int, std::vector< int > > streammap
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:34
lbninfo::magic
int magic
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:36
lbninfo::written_j40
int written_j40
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:41
lbninfo::wantedmap
std::map< int, int > wantedmap
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:33
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
myrand
TRandom3 myrand
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:27
lbninfo::j40ps
int j40ps
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:38
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
lbninfo::nevt
int nevt
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:35
lbninfo::noalgps
int noalgps
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:37
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
lbninfo::written_no_j40
int written_no_j40
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:41
lbninfo::currentevent
int currentevent
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:35
lbninfo::trigmap
std::vector< int > trigmap
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:39