ATLAS Offline Software
ByteStreamMultipleOutputStreamCopyTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 
12 // Gaudi
13 #include "GaudiKernel/GaudiException.h"
14 #include "GaudiKernel/ISvcLocator.h"
15 #include "GaudiKernel/MsgStream.h"
16 
17 #define IsBitSet(val, bit) ((val) & (1 << (bit)))
18 
19 #include <vector>
20 #include <map>
21 #include "TRandom3.h"
22 #include <stdexcept>
23 
25 ATLAS_NO_CHECK_FILE_THREAD_SAFETY; // this code is obsolete/unused (certainly in production)
26 
27 TRandom3 myrand;
28 
29 class lbninfo{
30 public:
32 
33  std::map<int,int> wantedmap;//map of nevent wanted by each stream
34  std::map<int, std::vector<int> > streammap;//map of actual events to be written to each stream
35  int currentevent, nevt;//keeps track of the number of events we've seen on this lbn, and the number there should be in total
36  int magic;//to make sure we're real...
37  int noalgps;//the HLT prescale of noalg trigger
38  int j40ps;//the HLT prescale of j40 trigger
39  std::vector<int> trigmap;//whether the j40 trigger fired for each of the nevt events
40  std::vector<int> trigevt;//event number for each of the nevt events, as taken from the trigfile, for cross-checking
42 
43  //makes the map of the event sequence to be written for each stream, based on the number of events wanted by each stream
44  void makestreammap(){
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  }
69 
70  //makes a string for printout of the streammap
71  std::string streameventstring(){
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  }
81 
82 };
83 
84 std::map<int, std::map<int, lbninfo> > runlbnmap;
85 
88  const std::string& type,
89  const std::string& name,
90  const IInterface* parent)
92  m_inputSvc("ByteStreamEventStorageInputSvc", name),
93  m_uselbnmap(false)
94 {
95  // Declare IAthenaOutputStreamTool interface
96  declareInterface<IAthenaOutputStreamTool>(this);
97 
98  declareProperty("lbn_map_file",m_lbn_map_file="lbn_anal_map.txt");
99  declareProperty("skipevents",m_skipevents=0);
100  declareProperty("trigfile",m_trigfile="");
101  declareProperty("NoutputSvc",m_NoutputSvc=50);
102  for (int i=0; i<m_NoutputSvc; ++i){
103  char buf[100];
104  sprintf(buf,"ByteStreamEventStorageOutputSvc%d",i);
105  //std::cout<<"Making "<<buf<<std::endl;
107 
108  //sprintf(buf,"ByteStreamOutputSvc%d",i);
109  //declareProperty(buf, m_outputSvc[i], "Handle to the ByteStreamOutputSvc");
110  }
111 
112  declareProperty("ByteStreamOutputSvc0", m_outputSvc[0], "Handle to the ByteStreamOutputSvc");
113  declareProperty("ByteStreamOutputSvc1", m_outputSvc[1], "Handle to the ByteStreamOutputSvc");
114  declareProperty("ByteStreamOutputSvc2", m_outputSvc[2], "Handle to the ByteStreamOutputSvc");
115  declareProperty("ByteStreamOutputSvc3", m_outputSvc[3], "Handle to the ByteStreamOutputSvc");
116  declareProperty("ByteStreamOutputSvc4", m_outputSvc[4], "Handle to the ByteStreamOutputSvc");
117  declareProperty("ByteStreamOutputSvc5", m_outputSvc[5], "Handle to the ByteStreamOutputSvc");
118  declareProperty("ByteStreamOutputSvc6", m_outputSvc[6], "Handle to the ByteStreamOutputSvc");
119  declareProperty("ByteStreamOutputSvc7", m_outputSvc[7], "Handle to the ByteStreamOutputSvc");
120  declareProperty("ByteStreamOutputSvc8", m_outputSvc[8], "Handle to the ByteStreamOutputSvc");
121  declareProperty("ByteStreamOutputSvc9", m_outputSvc[9], "Handle to the ByteStreamOutputSvc");
122  declareProperty("ByteStreamOutputSvc10", m_outputSvc[10], "Handle to the ByteStreamOutputSvc");
123  declareProperty("ByteStreamOutputSvc11", m_outputSvc[11], "Handle to the ByteStreamOutputSvc");
124  declareProperty("ByteStreamOutputSvc12", m_outputSvc[12], "Handle to the ByteStreamOutputSvc");
125  declareProperty("ByteStreamOutputSvc13", m_outputSvc[13], "Handle to the ByteStreamOutputSvc");
126  declareProperty("ByteStreamOutputSvc14", m_outputSvc[14], "Handle to the ByteStreamOutputSvc");
127  declareProperty("ByteStreamOutputSvc15", m_outputSvc[15], "Handle to the ByteStreamOutputSvc");
128  declareProperty("ByteStreamOutputSvc16", m_outputSvc[16], "Handle to the ByteStreamOutputSvc");
129  declareProperty("ByteStreamOutputSvc17", m_outputSvc[17], "Handle to the ByteStreamOutputSvc");
130  declareProperty("ByteStreamOutputSvc18", m_outputSvc[18], "Handle to the ByteStreamOutputSvc");
131  declareProperty("ByteStreamOutputSvc19", m_outputSvc[19], "Handle to the ByteStreamOutputSvc");
132  declareProperty("ByteStreamOutputSvc20", m_outputSvc[20], "Handle to the ByteStreamOutputSvc");
133  declareProperty("ByteStreamOutputSvc21", m_outputSvc[21], "Handle to the ByteStreamOutputSvc");
134  declareProperty("ByteStreamOutputSvc22", m_outputSvc[22], "Handle to the ByteStreamOutputSvc");
135  declareProperty("ByteStreamOutputSvc23", m_outputSvc[23], "Handle to the ByteStreamOutputSvc");
136  declareProperty("ByteStreamOutputSvc24", m_outputSvc[24], "Handle to the ByteStreamOutputSvc");
137  declareProperty("ByteStreamOutputSvc25", m_outputSvc[25], "Handle to the ByteStreamOutputSvc");
138  declareProperty("ByteStreamOutputSvc26", m_outputSvc[26], "Handle to the ByteStreamOutputSvc");
139  declareProperty("ByteStreamOutputSvc27", m_outputSvc[27], "Handle to the ByteStreamOutputSvc");
140  declareProperty("ByteStreamOutputSvc28", m_outputSvc[28], "Handle to the ByteStreamOutputSvc");
141  declareProperty("ByteStreamOutputSvc29", m_outputSvc[29], "Handle to the ByteStreamOutputSvc");
142  declareProperty("ByteStreamOutputSvc30", m_outputSvc[30], "Handle to the ByteStreamOutputSvc");
143  declareProperty("ByteStreamOutputSvc31", m_outputSvc[31], "Handle to the ByteStreamOutputSvc");
144  declareProperty("ByteStreamOutputSvc32", m_outputSvc[32], "Handle to the ByteStreamOutputSvc");
145  declareProperty("ByteStreamOutputSvc33", m_outputSvc[33], "Handle to the ByteStreamOutputSvc");
146  declareProperty("ByteStreamOutputSvc34", m_outputSvc[34], "Handle to the ByteStreamOutputSvc");
147  declareProperty("ByteStreamOutputSvc35", m_outputSvc[35], "Handle to the ByteStreamOutputSvc");
148  declareProperty("ByteStreamOutputSvc36", m_outputSvc[36], "Handle to the ByteStreamOutputSvc");
149  declareProperty("ByteStreamOutputSvc37", m_outputSvc[37], "Handle to the ByteStreamOutputSvc");
150  declareProperty("ByteStreamOutputSvc38", m_outputSvc[38], "Handle to the ByteStreamOutputSvc");
151  declareProperty("ByteStreamOutputSvc39", m_outputSvc[39], "Handle to the ByteStreamOutputSvc");
152  declareProperty("ByteStreamOutputSvc40", m_outputSvc[40], "Handle to the ByteStreamOutputSvc");
153  declareProperty("ByteStreamOutputSvc41", m_outputSvc[41], "Handle to the ByteStreamOutputSvc");
154  declareProperty("ByteStreamOutputSvc42", m_outputSvc[42], "Handle to the ByteStreamOutputSvc");
155  declareProperty("ByteStreamOutputSvc43", m_outputSvc[43], "Handle to the ByteStreamOutputSvc");
156  declareProperty("ByteStreamOutputSvc44", m_outputSvc[44], "Handle to the ByteStreamOutputSvc");
157  declareProperty("ByteStreamOutputSvc45", m_outputSvc[45], "Handle to the ByteStreamOutputSvc");
158  declareProperty("ByteStreamOutputSvc46", m_outputSvc[46], "Handle to the ByteStreamOutputSvc");
159  declareProperty("ByteStreamOutputSvc47", m_outputSvc[47], "Handle to the ByteStreamOutputSvc");
160  declareProperty("ByteStreamOutputSvc48", m_outputSvc[48], "Handle to the ByteStreamOutputSvc");
161  declareProperty("ByteStreamOutputSvc49", m_outputSvc[49], "Handle to the ByteStreamOutputSvc");
162 
163  declareProperty("ByteStreamInputSvc", m_inputSvc, "Handle to the ByteStreamInputSvc");
164 }
165 //__________________________________________________________________________
167 }
168 //__________________________________________________________________________
170  ATH_MSG_INFO( "Initializing" );
171 
172  CHECK( ::AlgTool::initialize() );
173 
174  // retrieve services
175  CHECK( m_inputSvc.retrieve() );
176 
177  for (int i=0; i<m_NoutputSvc; ++i){
178  CHECK( m_outputSvc[i].retrieve() );
179  }
180 
181  if (m_lbn_map_file!=std::string("") && m_lbn_map_file!=std::string("random") && m_lbn_map_file!=std::string("serial") ) m_uselbnmap=true;
182  ATH_MSG_INFO( "lbn_map_file is "<<m_lbn_map_file<<" and uselbnmap is "<<m_uselbnmap );
183 
184  if (m_uselbnmap==true) initlbnmap();
185 
186  return(StatusCode::SUCCESS);
187 }
188 
190 
191  //read the runlbn map
192  std::string file = m_lbn_map_file;
193  ATH_MSG_INFO( "Going to open "<<file );
194  FILE *fp = fopen(file.c_str(),"r");
195  if (!fp) {
196  ATH_MSG_ERROR( "Could not open "<<file<<"!" );
197  throw std::runtime_error("File could not be opened in ByteStreamMultipleOutputStreamCopyTool::initlbnmap");
198  }
199  char *line=new char[500];
200  int stream,run,lbn,nevt,nwanted;
201  float intlumi,intlumifrac;
202  while (fgets(line,480,fp)) {
203  if (line[0]=='-') continue;
204  int s=sscanf(&line[0],"stream %d, run %d, lbn %d, has %d events and %f/ub, %f intlumi of run, and %d wanted",&stream,&run,&lbn,&nevt,&intlumi,&intlumifrac,&nwanted);
205  if (s>0) {
206  ATH_MSG_DEBUG(run<<" "<<lbn<<" has "<<nevt<<" events and we want "<<nwanted<<" of them for stream "<<stream);
207  runlbnmap[run][lbn].magic=9999;
208  runlbnmap[run][lbn].nevt=nevt;
209  for (int w=0; w<m_NoutputSvc; ++w){runlbnmap[run][lbn].wantedmap[w]=nwanted;}
210  }
211  else{
212  ATH_MSG_ERROR("Line in "<<file<<" not understood!");
214  }
215  }
216  fclose(fp);
217  delete [] line;
218 
219  if (m_trigfile!=""){
220  //read the trigger info file
221  std::string file = m_trigfile;
222  ATH_MSG_INFO( "Going to open "<<file );
223  FILE *fp = fopen(file.c_str(),"r");
224  if (!fp) {
225  ATH_MSG_ERROR( "Could not open "<<file<<"!" );
226  throw std::runtime_error("File could not be opened in ByteStreamMultipleOutputStreamCopyTool::initlbnmap");
227  }
228  char *line=new char[500];
229  int run,evt,time,lbn,noalg,j40,psnoalg,psj40;
230  int evtinfile=0;
231  while (fgets(line,480,fp)) {
232  if (line[0]=='-') continue;
233  int s=sscanf(&line[0],"run_nbr=%d, evt_nbr=%d, time_stamp=%d, lbk_nbr=%d, noalg=%d, j40=%d, noalgps=%d, j40ps=%d",&run,&evt,&time,&lbn,&noalg,&j40,&psnoalg,&psj40);
234  if (s>0) {
235  ATH_MSG_INFO(evtinfile<<": "<<run<<" "<<lbn<<" "<<evt<<": passed noalg j40 "<<noalg<<" "<<j40<<", prescale noalg j40 "<<psnoalg<<" "<<psj40);
236 
237  if (runlbnmap[run][lbn].noalgps!=-1){
238  assert(runlbnmap[run][lbn].noalgps == psnoalg);//it should be the same for every event in the lbn
239  }
240  else runlbnmap[run][lbn].noalgps=psnoalg;
241 
242  if (runlbnmap[run][lbn].j40ps!=-1){
243  assert(runlbnmap[run][lbn].j40ps == psj40);//it should be the same for every event in the lbn
244  }
245  else runlbnmap[run][lbn].j40ps=psj40;
246 
247  runlbnmap[run][lbn].trigmap.push_back(j40);//whether j40 fired for this event index in the file
248  runlbnmap[run][lbn].trigevt.push_back(evt);//event number for this event index in the file, for cross-checking
249  ++evtinfile;
250  }
251  else{
252  ATH_MSG_ERROR("Line in "<<file<<" not understood!");
254  }
255  }
256  fclose(fp);
257  delete [] line;
258  }
259 
260  myrand.SetSeed();
261  ATH_MSG_INFO("Seed is "<<myrand.GetSeed());
262 
263  //go through the runlbn map and figure out which events to put to which stream(s)
264  for (auto r = runlbnmap.begin(); r!=runlbnmap.end(); r++ ){
265  for (auto l = r->second.begin(); l!=r->second.end(); l++ ){
266  l->second.makestreammap();
267  ATH_MSG_INFO(r->first<<" "<<l->first<<" wants: "<<l->second.streameventstring());
268  }
269  }
270 
271 }
272 
273 //__________________________________________________________________________
275 
276  for (auto r = runlbnmap.begin(); r!=runlbnmap.end(); r++ ){
277  for (auto l = r->second.begin(); l!=r->second.end(); l++ ){
278 
279  if (l->second.magic!=9999){
280  ATH_MSG_WARNING("Run "<<r->first<<" saw events but wasn't in the map");
281  continue;
282  }
283 
284  ATH_MSG_INFO(r->first<<" "<<l->first<<" wrote out "<<l->second.written_j40<<" j40 and "<<l->second.written_no_j40<<" non-j40 events");
285 
286  if (l->second.currentevent!=0){
287  //check that we got all the events we were promised
288  if (l->second.currentevent!=l->second.nevt){
289  ATH_MSG_WARNING(r->first<<" "<<l->first<<" saw "<<l->second.currentevent<<" and we expected "<<l->second.nevt<<" events!");
290  }
291  else {
292  ATH_MSG_INFO(r->first<<" "<<l->first<<" saw all "<<l->second.nevt<<" events expected.");
293  }
294  }
295  }
296  }
297 
298 
299  for (int i=0; i<m_NoutputSvc; ++i){
300  CHECK( m_outputSvc[i].release() );
301  }
302  return(::AlgTool::finalize());
303 }
304 //__________________________________________________________________________
306  const std::string& /*cnvSvc*/,
307  bool /*extendProvenenceRecord*/) {
309  return StatusCode::SUCCESS;
310 }
311 //__________________________________________________________________________
314  return StatusCode::SUCCESS;
315 }
316 //__________________________________________________________________________
318  ATH_MSG_DEBUG( "In commitOutput" );
319  const RawEvent* re_c = m_inputSvc->currentEvent() ;
320  if(!re_c){
321  ATH_MSG_ERROR( " failed to get the current event from ByteStreamInputSvc " );
322  return StatusCode::FAILURE ;
323  }
324 
325  int run = re_c->run_no();
326  ATH_MSG_DEBUG("run is "<<run);
328  if (re_c->version() < 0x03010000) { eventNumber=re_c->lvl1_id(); }
329  else { eventNumber=re_c->global_id(); }
330  ATH_MSG_DEBUG("event is "<<eventNumber);
331  int lbn = re_c->lumi_block();
332  ATH_MSG_DEBUG("lbn is "<<lbn);
333  int bcid = re_c->bc_id();
334  ATH_MSG_DEBUG("bcid is "<<bcid);
335  int nL1word = re_c->nlvl1_trigger_info();
336  ATH_MSG_DEBUG("nL1word is "<<nL1word);
337  const OFFLINE_FRAGMENTS_NAMESPACE::DataType* L1word; re_c->lvl1_trigger_info(L1word);
338  int bit=240;//2*8 gets us to the Trigger AfterVeto (TAV) bank
339  ATH_MSG_DEBUG("bit "<<bit<<" fired? "<< IsBitSet(L1word[2*8+bit/32],bit%32) );
340 
341  //Skip the first N events, if asked to do so...
342  if (m_skipevents>0){
343  ATH_MSG_INFO("Skipping this event because skipevents="<<m_skipevents<<".");
344  --m_skipevents;
345  return StatusCode::SUCCESS ;
346  }
347 
348  if (m_uselbnmap==true){
349 
350  //See if we want this event in any stream...
351  lbninfo &l = runlbnmap[run][lbn];
352  if (l.magic!=9999){
353  ATH_MSG_WARNING( "Event in lbn "<<lbn<<" not in map... skipping." );
354  return StatusCode::SUCCESS ;
355  }
356 
357  if (l.noalgps>0){
358  //using trigmap info... check the event numbers line up
359  if (l.trigevt[l.currentevent] != (int)eventNumber){
360  ATH_MSG_ERROR("Trigmap was for event "<<l.trigevt[l.currentevent]<<" but we are on event "<<eventNumber);
361  }
362  else{
363  ATH_MSG_INFO("Trigmap matches for event "<<l.trigevt[l.currentevent]<<" and we are on event "<<eventNumber);
364  }
365  }
366 
367  if ((l.currentevent>=l.nevt || ((unsigned int)l.currentevent)>l.trigmap.size()) && l.noalgps>0) {
368  ATH_MSG_WARNING("Only expecting "<<l.nevt<<" events in "<<run<<" "<<lbn<<" with trigmap size "<<l.trigmap.size());
369  }
370 
371  std::vector<int> streams= l.streammap[l.currentevent];//so at this point the first event is at index 0, last at nevt-1
372  if (l.noalgps<0){ATH_MSG_INFO(lbn<<" "<<l.currentevent<<" goes to "<<streams.size()<<" streams");}
373  else{ATH_MSG_INFO(lbn<<" "<<l.currentevent<<" goes to "<<streams.size()<<" streams and j40 is "<<l.trigmap[l.currentevent]);}
374 
375  RawEvent* re = const_cast<RawEvent*>(re_c);
376  for (unsigned int s=0; s<streams.size(); ++s){
377  if (streams[s]>=m_NoutputSvc) ATH_MSG_ERROR("Stream "<<streams[s]<< "is more than we have ("<<m_NoutputSvc<<")");
378  else{
379  if( !m_outputSvc[streams[s]]->putEvent(re) ) {
380  ATH_MSG_ERROR( " failed to write event to ByteStreamOutputSvc"<<streams[s]);
381  return StatusCode::FAILURE ;
382  }
383  if (l.noalgps>0){ if (l.trigmap[l.currentevent]) l.written_j40++; else l.written_no_j40++; }
384  ATH_MSG_INFO( " wrote event to ByteStreamOutputSvc"<<streams[s] );
385  }
386  }
387  l.currentevent++;
388 
389  }//m_usebnlmap
390  else{
391  RawEvent* re = const_cast<RawEvent*>(re_c);
392  static int eventstream=-1,ntotevents=0;
393  if (m_lbn_map_file==std::string("random")){
394  eventstream = rand()%m_NoutputSvc;
395  if (eventstream<0 || eventstream>=m_NoutputSvc){
396  ATH_MSG_ERROR("Only have "<<m_NoutputSvc<<" streams but eventstream is "<<eventstream<<"!");
397  return StatusCode::FAILURE ;
398  }
399  }
400  else if (m_lbn_map_file==std::string("serial")){
401  if (ntotevents%100==0){ ++eventstream; }
402  if (eventstream<0 || eventstream>=m_NoutputSvc){
403  ATH_MSG_WARNING("Skipping event because only have "<<m_NoutputSvc<<" streams (of 100 events)");
404  return StatusCode::SUCCESS ;
405  }
406  }
407  else {
408  ATH_MSG_ERROR( " I don't know what lbn_map_file="<<m_lbn_map_file<<" means!");
409  return StatusCode::FAILURE ;
410  }
411 
412  if( !m_outputSvc[eventstream]->putEvent(re) ) {
413  ATH_MSG_ERROR( " failed to write event to ByteStreamOutputSvc"<<eventstream);
414  return StatusCode::FAILURE ;
415  }
416  ATH_MSG_INFO( " wrote event "<<ntotevents<<" to ByteStreamOutputSvc"<<eventstream);
417  ++ntotevents;
418  }
419  return StatusCode::SUCCESS ;
420 }
421 
422 //__________________________________________________________________________
424 {
425  return StatusCode::SUCCESS ;
426 }
427 
428 //__________________________________________________________________________
429 StatusCode ByteStreamMultipleOutputStreamCopyTool::streamObjects(const TypeKeyPairs& typeKeys, const std::string& /*outputName*/ ) {
430  if ( typeKeys.size()!=0){
431  MsgStream log(msgSvc(), name());
432  ATH_MSG_WARNING( " Streaming objects is not supported. The whole input event is written out" );
433  }
434 
435  return(StatusCode::SUCCESS);
436 }
437 //__________________________________________________________________________
438 StatusCode ByteStreamMultipleOutputStreamCopyTool::streamObjects(const DataObjectVec& dataObjects, const std::string& /*outputName*/ ) {
439  if ( dataObjects.size()!=0){
440  ATH_MSG_WARNING( " Streaming objects is not supported. The whole input event is written out" );
441  }
442 
443  return(StatusCode::SUCCESS);
444 }
445 //__________________________________________________________________________
447  if ( dataObjects.size()!=0){
448  ATH_MSG_WARNING( " fillObjectRefs is not supported. The whole input event is written out" );
449  }
450 
451  return(StatusCode::SUCCESS);
452 }
453 //__________________________________________________________________________
455  return(StatusCode::SUCCESS);
456 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ByteStreamMultipleOutputStreamCopyTool::initialize
virtual StatusCode initialize()
Initialize.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:169
beamspotman.r
def r
Definition: beamspotman.py:676
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
checkFileSG.line
line
Definition: checkFileSG.py:75
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
IAthenaOutputStreamTool::TypeKeyPairs
std::vector< TypeKeyPair > TypeKeyPairs
Definition: IAthenaOutputStreamTool.h:99
ByteStreamMultipleOutputStreamCopyTool::m_NoutputSvc
int m_NoutputSvc
Definition: ByteStreamMultipleOutputStreamCopyTool.h:110
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
OFFLINE_FRAGMENTS_NAMESPACE::DataType
uint32_t DataType
Definition: RawEvent.h:24
ByteStreamMultipleOutputStreamCopyTool::connectServices
virtual StatusCode connectServices(const std::string &dataStore, const std::string &cnvSvc, bool extendProvenenceRecord=false)
No need to connect Services.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:305
python.outputTest_v2.streams
streams
Definition: outputTest_v2.py:55
ByteStreamMultipleOutputStreamCopyTool::m_lbn_map_file
std::string m_lbn_map_file
Definition: ByteStreamMultipleOutputStreamCopyTool.h:104
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
lbninfo::streammap
std::map< int, std::vector< int > > streammap
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:34
lbninfo::magic
int magic
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:36
initialize
void initialize()
Definition: run_EoverP.cxx:894
lbninfo::written_j40
int written_j40
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:41
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
lbninfo::wantedmap
std::map< int, int > wantedmap
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:33
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
myrand
TRandom3 myrand
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:27
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
ByteStreamMultipleOutputStreamCopyTool::initlbnmap
void initlbnmap()
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:189
SG::IFolder
a run-time configurable list of data objects
Definition: SGIFolder.h:25
lbninfo::j40ps
int j40ps
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:38
ByteStreamMultipleOutputStreamCopyTool::streamObjects
virtual StatusCode streamObjects(const TypeKeyPairs &typeKeys, const std::string &outputName="")
No object written for this tool.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:429
ByteStreamMultipleOutputStreamCopyTool::getInputItemList
virtual StatusCode getInputItemList(SG::IFolder *m_p2BWrittenFromTool)
Get ItemList from the OutputStreamTool (e.g. all input objects)
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:454
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
ByteStreamMultipleOutputStreamCopyTool::~ByteStreamMultipleOutputStreamCopyTool
virtual ~ByteStreamMultipleOutputStreamCopyTool()
Destructor.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:166
ByteStreamMultipleOutputStreamCopyTool::m_uselbnmap
bool m_uselbnmap
Definition: ByteStreamMultipleOutputStreamCopyTool.h:103
lbninfo::lbninfo
lbninfo()
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:31
ByteStreamMultipleOutputStreamCopyTool::fillObjectRefs
virtual StatusCode fillObjectRefs(const DataObjectVec &dataObjects)
no refs for this tool.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:446
lbninfo::nevt
int nevt
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:35
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArG4FSStartPointFilter.rand
rand
Definition: LArG4FSStartPointFilter.py:80
ByteStreamMultipleOutputStreamCopyTool.h
Implementation of IAthenaOutputStreamTool for Copying ByteStream from input.
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
trigmenu_modify_prescale_json.fp
fp
Definition: trigmenu_modify_prescale_json.py:53
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ByteStreamMultipleOutputStreamCopyTool::m_outputSvc
std::vector< ServiceHandle< ByteStreamOutputSvc > > m_outputSvc
Definition: ByteStreamMultipleOutputStreamCopyTool.h:109
ByteStreamMultipleOutputStreamCopyTool::finalize
virtual StatusCode finalize()
Finalize.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:274
file
TFile * file
Definition: tile_monitor.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
lbninfo::noalgps
int noalgps
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:37
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
run
Definition: run.py:1
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
ByteStreamMultipleOutputStreamCopyTool::m_inputSvc
ServiceHandle< ByteStreamInputSvc > m_inputSvc
Definition: ByteStreamMultipleOutputStreamCopyTool.h:100
ByteStreamMultipleOutputStreamCopyTool::commitOutput
virtual StatusCode commitOutput(bool doCommit=false)
Commit the output stream after having streamed out objects Must commitOutput AFTER streaming.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:317
IsBitSet
#define IsBitSet(val, bit)
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:17
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:25
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
lbninfo::written_no_j40
int written_no_j40
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:41
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
lbninfo::currentevent
int currentevent
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:35
ByteStreamMultipleOutputStreamCopyTool::ByteStreamMultipleOutputStreamCopyTool
ByteStreamMultipleOutputStreamCopyTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:87
ByteStreamMultipleOutputStreamCopyTool::connectOutput
virtual StatusCode connectOutput(const std::string &outputName="")
Connect to the output stream Must connectOutput BEFORE streaming Only specify "outputName" if one wan...
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:312
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
lbninfo
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:29
IAthenaOutputStreamTool::DataObjectVec
std::vector< DataObject * > DataObjectVec
Stream out a vector of objects Must convert to DataObject, e.g.
Definition: IAthenaOutputStreamTool.h:107
lbninfo::makestreammap
void makestreammap()
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:44
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
lumiFormat.intlumi
intlumi
Definition: lumiFormat.py:114
re
const boost::regex re(r_e)
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
runlbnmap
std::map< int, std::map< int, lbninfo > > runlbnmap
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:84
lbninfo::trigevt
std::vector< int > trigevt
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:40
ByteStreamMultipleOutputStreamCopyTool::finalizeOutput
virtual StatusCode finalizeOutput()
Finalize the output stream after the last commit, e.g.
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:423
ByteStreamMultipleOutputStreamCopyTool::m_trigfile
std::string m_trigfile
Definition: ByteStreamMultipleOutputStreamCopyTool.h:105
AthAlgTool
Definition: AthAlgTool.h:26
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
checker_macros.h
Define macros for attributes used to control the static checker.
lbninfo::trigmap
std::vector< int > trigmap
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:39
LB_AnalMapSplitter.lbn
lbn
Definition: LB_AnalMapSplitter.py:28
ByteStreamMultipleOutputStreamCopyTool::m_skipevents
int m_skipevents
Definition: ByteStreamMultipleOutputStreamCopyTool.h:112
ServiceHandle< ByteStreamOutputSvc >
lbninfo::streameventstring
std::string streameventstring()
Definition: ByteStreamMultipleOutputStreamCopyTool.cxx:71