ATLAS Offline Software
EventInfo_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // System include(s):
6 #include <atomic>
7 #include <iostream>
8 #include <iomanip>
9 #include <stdexcept>
10 
11 // EDM include(s):
14 #include "CxxUtils/stall.h"
15 
16 // Local include(s):
19 #include "EventInfoAccessors_v1.h"
20 
21 #ifndef XAOD_STANDALONE
22 # include "StoreGate/StoreGateSvc.h"
24 #endif
25 
27 
28  // Forward declaration(s):
29  template< typename T >
30  std::ostream& operator<<( std::ostream& out, const std::set< T >& s );
31 
33  template< typename T >
34  std::ostream& operator<<( std::ostream& out, const std::vector< T >& vec ) {
35 
36  out << "[";
37  for( size_t i = 0; i < vec.size(); ++i ) {
38  out << vec[ i ];
39  if( i != ( vec.size() - 1 ) ) {
40  out << ", ";
41  }
42  }
43  out << "]";
44  return out;
45  }
46 
48  template< typename T >
49  std::ostream& operator<<( std::ostream& out, const std::set< T >& s ) {
50 
51  return out << std::vector< T >( begin( s ), end( s ) );
52  }
53 
57  void pileupUnsetHook() {
58  static std::atomic< bool > uninitPileupAccessPrinted = false;
59  if( ! uninitPileupAccessPrinted ) {
60  std::cout << "xAOD::EventInfo WARNING Uninitialised pileup value was "
61  "accessed.\n"
62  " Debug it by breaking on "
63  "xAODEventInfoPrivate::pileupUnsetHook function calls!"
64  << std::endl;
65  uninitPileupAccessPrinted = true;
66  }
67  return;
68  }
69 
70  // register attributes' types early (before I/O) for schema evolution
71  static const SG::AuxElement::Accessor< uint64_t > accEvNum( "eventNumber" );
72  static const SG::AuxElement::Accessor< uint64_t > accMcEvNum( "mcEventNumber" );
73  static const SG::AuxElement::Accessor< uint64_t > accLow( "pileUpMixtureIDLowBits" );
74  static const SG::AuxElement::Accessor< uint64_t > accHigh( "pileUpMixtureIDHighBits" );
75 
76 } // private namespace
77 
78 namespace xAOD {
79 
80  using xAODEventInfoPrivate::operator<<;
81 
83  : SG::AuxElement(), m_streamTags(),
84  m_subEvents(), m_evtStore( nullptr ) {
85 
86  }
87 
89  : SG::AuxElement(parent), m_streamTags(),
90  m_subEvents(),
91  m_evtStore( parent.m_evtStore ) {
92 
94  }
95 
97 
98  if (&rhs != this) {
99  // Clear out the caches:
100  m_streamTags.store (std::vector< StreamTag >());
101  m_streamTags.reset();
102  m_subEvents.store (std::vector< SubEvent >());
103  m_subEvents.reset();
104 
105  // Copy the event store pointer:
106  m_evtStore = rhs.m_evtStore;
107 
108  // Copy the auxiliary variables:
110  }
111 
112  // Return this object:
113  return *this;
114  }
115 
117  //
118  // Implementation of the basic event properties
119  //
120 
122  runNumber, setRunNumber )
124  eventNumber, setEventNumber )
128  timeStamp, setTimeStamp )
130  timeStampNSOffset,
131  setTimeStampNSOffset )
133  bcid, setBCID )
135  detectorMask0, setDetectorMask0 )
137  detectorMask1, setDetectorMask1 )
139  detectorMask2, setDetectorMask2 )
141  detectorMask3, setDetectorMask3 )
142 
143  uint64_t EventInfo_v1::detectorMask() const {
144 
145  return ( ( static_cast< uint64_t >( detectorMask1() ) << 32 ) |
146  detectorMask0() );
147  }
148 
150 
151  setDetectorMask0( mask0 );
152  setDetectorMask1( mask1 );
153  return;
154  }
155 
157 
158  setDetectorMask0( static_cast< uint32_t >( mask & 0xffffffff ) );
159  setDetectorMask1( static_cast< uint32_t >( ( mask >> 32 ) &
160  0xffffffff ) );
161  return;
162  }
163 
165 
166  return ( ( static_cast< uint64_t >( detectorMask3() ) << 32 ) |
167  detectorMask2() );
168  }
169 
171 
172  setDetectorMask2( mask2 );
173  setDetectorMask3( mask3 );
174  return;
175  }
176 
178 
179  setDetectorMask2( static_cast< uint32_t >( mask & 0xffffffff ) );
180  setDetectorMask3( static_cast< uint32_t >( ( mask >> 32 ) &
181  0xffffffff ) );
182  return;
183  }
184 
185  //
187 
189  //
190  // Implementation of the event type properties
191  //
192 
195  detDescrTags, setDetDescrTags )
197  mcChannelNumber, setMCChannelNumber )
199  mcEventNumber, setMCEventNumber )
201  mcEventWeights, setMCEventWeights )
202 
203  float EventInfo_v1::mcEventWeight( size_t i ) const {
204 
205  // Throw an exception when asked for an impossible index:
206  return mcEventWeights().at( i );
207  }
208 
210  eventTypeBitmask, setEventTypeBitmask )
211 
212  bool EventInfo_v1::eventType( EventType type ) const {
213 
214  return ( eventTypeBitmask() & static_cast< uint32_t >( type ) );
215  }
216 
217  //
219 
221  //
222  // Implementation of the trigger related properties
223  //
224 
226  statusElement, setStatusElement )
228  extendedLevel1ID, setExtendedLevel1ID )
230  level1TriggerType,
231  setLevel1TriggerType )
232 
233  EventInfo_v1::StreamTag::StreamTag( const std::string& name,
234  const std::string& type,
235  bool obeysLumiblock,
236  const std::set< uint32_t >& robs,
237  const std::set< uint32_t >& dets )
238  : m_name( name ), m_type( type ), m_obeysLumiblock( obeysLumiblock ),
239  m_robs( robs ), m_dets( dets ) {
240 
241  }
242 
243  const std::string& EventInfo_v1::StreamTag::name() const {
244 
245  return m_name;
246  }
247 
248  const std::string& EventInfo_v1::StreamTag::type() const {
249 
250  return m_type;
251  }
252 
253  bool EventInfo_v1::StreamTag::obeysLumiblock() const {
254 
255  return m_obeysLumiblock;
256  }
257 
258  const std::set< uint32_t >& EventInfo_v1::StreamTag::robs() const {
259 
260  return m_robs;
261  }
262 
263  const std::set< uint32_t >& EventInfo_v1::StreamTag::dets() const {
264 
265  return m_dets;
266  }
267 
268  //
269  // Accessor objects for the stream properties:
270  //
272  names( "streamTagNames" );
274  types( "streamTagTypes" );
276  olb( "streamTagObeysLumiblock" );
278  robsets( "streamTagRobs" );
280  detsets( "streamTagDets" );
281 
282  const std::vector< EventInfo_v1::StreamTag >&
283  EventInfo_v1::streamTags() const {
284 
285  // Cache the new information if necessary:
286  if( !m_streamTags.isValid() ) {
287  std::vector< StreamTag > tags;
288 
289  // A little sanity check:
290  if( ( names( *this ).size() != types( *this ).size() ) ||
291  ( names( *this ).size() != olb( *this ).size() ) ||
292  ( robsets.isAvailable( *this ) &&
293  ( names( *this ).size() != robsets( *this ).size() ) ) ||
294  ( detsets.isAvailable( *this ) &&
295  ( names( *this ).size() != detsets( *this ).size() ) ) ) {
296  std::cerr << "<xAOD::EventInfo_v1::streamTags> ERROR "
297  << "Corrupt information found!" << std::endl;
298  std::cerr << " streamTagNames = " << names( *this )
299  << std::endl;
300  std::cerr << " streamTagTypes = " << types( *this )
301  << std::endl;
302  std::cerr << " streamTagObeysLumiblock = " << olb( *this )
303  << std::endl;
304  std::cerr << " streamTagRobs = ";
305  if( robsets.isAvailable( *this ) ) {
306  std::cerr << "N/A" << std::endl;
307  } else {
308  std::cerr << robsets( *this ) << std::endl;
309  }
310  std::cerr << " streamTagDets = ";
311  if( detsets.isAvailable( *this ) ) {
312  std::cerr << "N/A" << std::endl;
313  } else {
314  std::cerr << detsets( *this ) << std::endl;
315  }
316  }
317 
318  else {
319  // Fill the tags.
320  for( size_t i = 0; i < names( *this ).size(); ++i ) {
321  static const std::set< uint32_t > dummySet;
322  tags.emplace_back( names( *this )[ i ],
323  types( *this )[ i ],
324  olb( *this )[ i ],
325  ( robsets.isAvailable( *this ) ?
326  robsets( *this )[ i ] :
327  dummySet ),
328  ( detsets.isAvailable( *this ) ?
329  detsets( *this )[ i ] :
330  dummySet ) );
331  }
332  }
333 
334  // Set the cache.
335  m_streamTags.set (std::move (tags));
336  }
337 
338  // Return the cached object:
339  return *m_streamTags.ptr();
340  }
341 
342  void EventInfo_v1::setStreamTags( const std::vector< StreamTag >& value ) {
343 
344  // Update the cached information:
345  m_streamTags.store (value);
346 
347  // Clear the persistent information:
348  names( *this ).clear(); types( *this ).clear(); olb( *this ).clear();
349  robsets( *this ).clear(); detsets( *this ).clear();
350 
351  // Fill the persistent information:
352  std::vector< StreamTag >::const_iterator itr = value.begin();
353  std::vector< StreamTag >::const_iterator end = value.end();
354  for( ; itr != end; ++itr ) {
355  names( *this ).push_back( itr->name() );
356  types( *this ).push_back( itr->type() );
357  olb( *this ).push_back( itr->obeysLumiblock() );
358  robsets( *this ).push_back( itr->robs() );
359  detsets( *this ).push_back( itr->dets() );
360  }
361 
362  return;
363  }
364 
365  //
367 
369  //
370  // Implementation of the pileup information functions
371  //
372 
375  accActualInteractionsPerCrossing( "actualInteractionsPerCrossing" );
378  accAverageInteractionsPerCrossing( "averageInteractionsPerCrossing" );
379 
380  float EventInfo_v1::actualInteractionsPerCrossing() const {
381 
382  // If the value is not available, then return 0.0, but allow users to
383  // find out about this issue.
384  if( ! accActualInteractionsPerCrossing.isAvailable( *this ) ) {
386  return 0.0f;
387  }
388  return accActualInteractionsPerCrossing( *this );
389  }
390 
391  void EventInfo_v1::setActualInteractionsPerCrossing( float value ) {
392 
393  accActualInteractionsPerCrossing( *this ) = value;
394  return;
395  }
396 
397  float EventInfo_v1::averageInteractionsPerCrossing() const {
398 
399  // If the value is not available, then return 0.0, but allow users to
400  // find out about this issue.
401  if( ! accAverageInteractionsPerCrossing.isAvailable( *this ) ) {
403  return 0.0f;
404  }
405  return accAverageInteractionsPerCrossing( *this );
406  }
407 
408  void EventInfo_v1::setAverageInteractionsPerCrossing( float value ) {
409 
410  accAverageInteractionsPerCrossing( *this ) = value;
411  return;
412  }
413 
415  pileUpMixtureIDLowBits,
416  setPileUpMixtureIDLowBits )
419  setPileUpMixtureIDHighBits )
420 
421  EventInfo_v1::PileUpMixtureID EventInfo_v1::pileUpMixtureID() const {
422 
423  PileUpMixtureID id{};
424 
425  // We need to check if the values are actually stored
426  if ( xAODEventInfoPrivate::accLow.isAvailable( *this )
427  && xAODEventInfoPrivate::accHigh.isAvailable( *this ) ) {
428  id.lowBits = pileUpMixtureIDLowBits();
429  id.highBits = pileUpMixtureIDHighBits();
430  }
431 
432  return id;
433 
434  }
435 
436  void EventInfo_v1::setPileUpMixtureID( const PileUpMixtureID& value ) {
437 
438  setPileUpMixtureIDLowBits( value.lowBits );
439  setPileUpMixtureIDHighBits( value.highBits );
440 
441  }
442 
446  : m_time( time ), m_index( index ), m_type( type ), m_link( link ) {
447 
448  }
449 
451 
452  return m_time;
453  }
454 
456 
457  return m_index;
458  }
459 
461 
462  return m_type;
463  }
464 
465  const std::string& EventInfo_v1::SubEvent::typeName() const {
466 
467  // This is a really inefficienct implementation, but didn't
468  // feel like writing a short and efficient implementation for C++11,
469  // and a longer but still efficient version for C++03. This is a
470  // medium-sized, slow implementation that works everywhere... :-P
471  if( m_type == Signal ) {
472  static const std::string name = "Signal";
473  return name;
474  } else if( m_type == MinimumBias ) {
475  static const std::string name = "MinimumBias";
476  return name;
477  } else if( m_type == Cavern ) {
478  static const std::string name = "Cavern";
479  return name;
480  } else if( m_type == HaloGas ) {
481  static const std::string name = "HaloGas";
482  return name;
483  } else if( m_type == HighPtMinimumBias ) {
484  static const std::string name = "HighPtMinimumBias";
485  return name;
486  } else if( m_type == ZeroBias ) {
487  static const std::string name = "ZeroBias";
488  return name;
489  } else {
490  static const std::string name = "Unknown";
491  return name;
492  }
493  }
494 
497 
498  return m_link;
499  }
500 
502 
503  if( m_link.isValid() ) {
504  return *m_link;
505  } else {
506  return nullptr;
507  }
508  }
509 
510  //
511  // Accessor objects for the sub-event properties:
512  //
514  timeAcc( "subEventTime" );
516  indexAcc( "subEventIndex" );
518  linkAcc( "subEventLink" );
520  typeAcc( "subEventType" );
521 
522  std::vector< EventInfo_v1::SubEvent >
524  {
525  std::vector< SubEvent > subEvents;
526 
527  // Check if any of the information is available:
528  if( ( ! timeAcc.isAvailable( *this ) ) &&
529  ( ! indexAcc.isAvailable( *this ) ) &&
530  ( ! linkAcc.isAvailable( *this ) ) &&
531  ( ! typeAcc.isAvailable( *this ) ) )
532  {
533  // If not, return right away:
534  return subEvents;
535  }
536  // A little sanity check:
537  size_t size = 0;
538  if( timeAcc.isAvailable( *this ) ) {
539  size = timeAcc( *this ).size();
540  } else if( indexAcc.isAvailable( *this ) ) {
541  size = indexAcc( *this ).size();
542  } else if( linkAcc.isAvailable( *this ) ) {
543  size = linkAcc( *this ).size();
544  } else if( typeAcc.isAvailable( *this ) ) {
545  size = typeAcc( *this ).size();
546  } else {
547  std::cerr << "xAOD::EventInfo_v1 ERROR Logic error in subEvents()"
548  << std::endl;
549  return subEvents;
550  }
551  if( ( timeAcc.isAvailable( *this ) &&
552  ( size != timeAcc( *this ).size() ) ) ||
553  ( indexAcc.isAvailable( *this ) &&
554  ( size != indexAcc( *this ).size() ) ) ||
555  ( linkAcc.isAvailable( *this ) &&
556  ( size != linkAcc( *this ).size() ) ) ||
557  ( typeAcc.isAvailable( *this ) &&
558  ( size != typeAcc( *this ).size() ) ) ) {
559  std::cerr << "xAOD::EventInfo_v1 ERROR Data corruption found in "
560  << "the sub-event information" << std::endl;
561  std::cerr << "subEventTime = "
562  << ( timeAcc.isAvailable( *this ) ? timeAcc( *this ) :
563  std::vector< int16_t >() ) << std::endl;
564  std::cerr << "subEventIndex = "
565  << ( indexAcc.isAvailable( *this ) ? indexAcc( *this ) :
566  std::vector< uint16_t >() ) << std::endl;
567  std::cerr << "subEventLink = "
568  << ( linkAcc.isAvailable( *this ) ? linkAcc( *this ) :
569  std::vector< ElementLink< EventInfoContainer_v1 > >() )
570  << std::endl;
571  std::cerr << "subEventType = "
572  << ( typeAcc.isAvailable( *this ) ? typeAcc( *this ) :
573  std::vector< uint16_t >() ) << std::endl;
574  return subEvents;
575  }
576  // Fill up the cache:
577  for( size_t i = 0; i < size; ++i ) {
578  const int16_t time =
579  timeAcc.isAvailable( *this ) ? timeAcc( *this )[ i ] : 0;
580  const uint16_t index =
581  indexAcc.isAvailable( *this ) ? indexAcc( *this )[ i ] : 0;
583  linkAcc.isAvailable( *this ) ? linkAcc( *this )[ i ] :
585  const PileUpType type =
586  ( typeAcc.isAvailable( *this ) ?
587  static_cast< PileUpType >( typeAcc( *this )[ i ] ) :
588  Unknown );
589  subEvents.emplace_back( time, index, type, link );
590  }
591 
592  return subEvents;
593  }
594 
595  const std::vector< EventInfo_v1::SubEvent >&
597 
598  // Cache the new information if necessary:
599  if( !m_subEvents.isValid() ) {
600  m_subEvents.set (makeSubEvents());
601  }
602 
603  // Return the cached vector:
604  return *m_subEvents.ptr();
605  }
606 
607  void EventInfo_v1::setSubEvents( const std::vector< SubEvent >& value ) {
608 
609  // Update the cached information:
610  m_subEvents.store (value);
611 
612  // Clear the persistent information:
613  timeAcc( *this ).clear(); indexAcc( *this ).clear();
614  typeAcc( *this ).clear(); linkAcc( *this ).clear();
615 
616  // Fill the persistent information:
617  std::vector< SubEvent >::const_iterator itr = value.begin();
618  std::vector< SubEvent >::const_iterator end = value.end();
619  for( ; itr != end; ++itr ) {
620  timeAcc( *this ).push_back( itr->time() );
621  indexAcc( *this ).push_back( itr->index() );
622  typeAcc( *this ).push_back( static_cast< uint16_t >( itr->type() ) );
623  linkAcc( *this ).push_back( itr->link() );
624  }
625 
626  return;
627  }
628 
629  void EventInfo_v1::addSubEvent( const SubEvent& subEvent ) {
630 
631  // First, make sure that the persistent and transient variables are in
632  // sync:
633  subEvents();
634 
635  // Now, add the new sub-event:
636  std::vector<SubEvent> subEvents = *m_subEvents.ptr();
637  subEvents.push_back( subEvent );
638  m_subEvents.store (std::move (subEvents));
639  timeAcc( *this ).push_back( subEvent.time() );
640  indexAcc( *this ).push_back( subEvent.index() );
641  typeAcc( *this ).push_back( static_cast< uint16_t >( subEvent.type() ) );
642  linkAcc( *this ).push_back( subEvent.link() );
643 
644  return;
645  }
646 
648 
649  // Clear both the transient and persistent variables:
650  m_subEvents.store (std::vector<SubEvent>());
651  m_subEvents.reset();
652  timeAcc( *this ).clear(); indexAcc( *this ).clear();
653  typeAcc( *this ).clear(); linkAcc( *this ).clear();
654 
655  return;
656  }
657 
659  {
660  static const std::string typNam[PileUp_NTYPES+1] = {
661  "Unknown" /*99*/,
662  "Signal" /*0*/,
663  "MinimumBias" /*1*/,
664  "Cavern" /*2*/,
665  "HaloGas"/*3*/,
666  "ZeroBias"/*4*/ };
667  int t = (typ==Unknown)? 0: (int)typ+1;
668  assert( t <= PileUp_NTYPES );
669  return typNam[t];
670  }
671 
673  {
674  static const PileUpType typEnum[PileUp_NTYPES+1] = {
675  Unknown /*99*/, Signal /*0*/, MinimumBias /*1*/, Cavern /*2*/, HaloGas /*3*/, ZeroBias /*4*/
676  };
677  int t = (typ==99)? 0: (int)typ+1;
678  assert( t <= PileUp_NTYPES );
679  return typEnum[t];
680  }
681 
682  //
684 
686  //
687  // Implementation of the detector flags
688  //
689 
691  static const uint32_t EF_BITS = 0x0FFFFFFF;
693  static const uint32_t EF_ERROR_BITS = 0xF0000000;
695  static const uint32_t EF_ERROR_SHIFT = 28;
696 
698 
699  return ( ( *eventFlagsConstAccessorsV1( subDet ) )( *this ) &
700  EF_BITS );
701  }
702 
704  size_t bit ) const {
705 
706  // A little sanity check:
707  if( bit >= EF_ERROR_SHIFT ) {
708  throw std::runtime_error( "EventInfo_v1::isEventFlagBitSet: Asked for "
709  "non-existent bit" );
710  }
711 
712  // Get the value of the flags:
713  uint32_t value = ( *eventFlagsConstAccessorsV1( subDet ) )( *this );
714 
715  // Dig out the bit we are asking for:
716  return ( ( value >> bit ) & 0x1 );
717  }
718 
720 
721  // Get the accessor:
723  if( ! acc ) {
724  return false;
725  }
726 
727  // Construct the value that we want to store, taking the current error
728  // flags into account:
729  std::atomic<uint32_t>& a = (*acc)(*this);
730  uint32_t orig = a;
731  uint32_t value = ( ( orig & EF_ERROR_BITS ) | ( flags & EF_BITS ) );
732  while (!a.compare_exchange_strong (orig, value)) {
733  CxxUtils::stall();
734  value = ( ( orig & EF_ERROR_BITS ) | ( flags & EF_BITS ) );
735  }
736 
737  // Tell the user that we were successful:
738  return true;
739  }
740 
741  bool EventInfo_v1::setEventFlagBit( EventFlagSubDet subDet, size_t bit) const
742  {
743  return updateEventFlagBit (subDet, bit);
744  }
745 
746  bool EventInfo_v1::updateEventFlagBit( EventFlagSubDet subDet, size_t bit) const
747  {
748  // Check if the bit makes sense:
749  if( bit >= EF_ERROR_SHIFT ) {
750  return false;
751  }
752 
753  // Don't try to write if the requested flag is already set.
754  uint32_t existingFlags = (*eventFlagsConstAccessorsV1( subDet ))( *this );
755  if (existingFlags & (1u << bit)) {
756  return true;
757  }
758 
759  // Get the accessor:
761  if( ! acc ) {
762  return false;
763  }
764 
765  // Set the new value:
766  ( *acc )( *this ) |= ( 1u << bit );
767 
768  // Tell the user that we were successful:
769  return true;
770  }
771 
773  {
774  // Get the accessor:
776  if( ! acc ) {
777  return false;
778  }
779 
780  // Check if the bit makes sense:
781  if( bit >= EF_ERROR_SHIFT ) {
782  return false;
783  }
784 
785  // Set the new value:
786  ( *acc )( *this ) &= ~( 1u << bit );
787 
788  // Tell the user that we were successful:
789  return true;
790  }
791 
793  const uint32_t flags_in) const
794  {
795  uint32_t flags = flags_in & EF_BITS;
796 
797  // Don't try to write if all requested flags are already set.
798  uint32_t existingFlags = (*eventFlagsConstAccessorsV1( subDet ))( *this );
799  if ((existingFlags | flags) == existingFlags) {
800  return true;
801  }
802 
803  // Get the accessor:
805  if( ! acc ) {
806  return false;
807  }
808 
809  // Set the new value:
810  ( *acc )( *this ) |= ( flags & EF_BITS );
811 
812  // Tell the user that we were successful:
813  return true;
814  }
815 
818 
819  // Get the value in one go:
820  return static_cast< EventFlagErrorState >(
821  ( ( *eventFlagsConstAccessorsV1( subDet ) )( *this ) >> EF_ERROR_SHIFT ) &
822  0xF );
823  }
824 
826  EventFlagErrorState state ) {
827 
828  // Get the accessor:
830  if( ! acc ) {
831  return false;
832  }
833 
834  // Check its value:
835  if( ( state != NotSet ) && ( state != Warning ) && ( state != Error ) ) {
836  return false;
837  }
838 
839  // Construct the new value:
840  std::atomic<uint32_t>& a = (*acc)(*this);
841  uint32_t orig = a;
842  uint32_t value = ( ( orig & EF_BITS ) |
843  ( static_cast< uint32_t >( state ) <<
844  EF_ERROR_SHIFT ) );
845  while (!a.compare_exchange_strong (orig, value)) {
846  CxxUtils::stall();
847  value = ( ( orig & EF_BITS ) |
848  ( static_cast< uint32_t >( state ) <<
849  EF_ERROR_SHIFT ) );
850  }
851 
852  // Tell the user that we were successful:
853  return true;
854  }
855 
857  const EventFlagErrorState state ) const
858  {
859  // Check its value:
860  if( ( state != NotSet ) && ( state != Warning ) && ( state != Error ) ) {
861  return false;
862  }
863 
864  // Return without trying to write if the desired state is
865  // already set.
866  if (errorState (subDet) == state) {
867  return true;
868  }
869 
870  // Get the accessor:
872  if( ! acc ) {
873  return false;
874  }
875 
876  // Construct the new value:
877  std::atomic<uint32_t>& a = (*acc)(*this);
878  uint32_t orig = a;
879 
880  // Only allow increasing the error state in an update.
881  if (state < ((orig >> EF_ERROR_SHIFT) & 0xf)) {
882  return false;
883  }
884 
885  uint32_t value = ( ( orig & EF_BITS ) |
886  ( static_cast< uint32_t >( state ) <<
887  EF_ERROR_SHIFT ) );
888  while (!a.compare_exchange_strong (orig, value)) {
889  if (state < ((orig >> EF_ERROR_SHIFT) & 0xf)) {
890  return false;
891  }
892 
893  value = ( ( orig & EF_BITS ) |
894  ( static_cast< uint32_t >( state ) <<
895  EF_ERROR_SHIFT ) );
896 
897  CxxUtils::stall();
898  }
899 
900  // Tell the user that we were successful:
901  return true;
902  }
903 
904  //
906 
908  //
909  // Implementation of the beam spot functions
910  //
911 
915 
916  void EventInfo_v1::setBeamPos( float x, float y, float z ) {
917 
918  // The accessor objects:
919  static const Accessor< float > accX( "beamPosX" );
920  static const Accessor< float > accY( "beamPosY" );
921  static const Accessor< float > accZ( "beamPosZ" );
922 
923  // Set the variables:
924  accX( *this ) = x;
925  accY( *this ) = y;
926  accZ( *this ) = z;
927 
928  return;
929  }
930 
934 
935  void EventInfo_v1::setBeamPosSigma( float x, float y, float z ) {
936 
937  // The accessor objects:
938  static const Accessor< float > accX( "beamPosSigmaX" );
939  static const Accessor< float > accY( "beamPosSigmaY" );
940  static const Accessor< float > accZ( "beamPosSigmaZ" );
941 
942  // Set the variables:
943  accX( *this ) = x;
944  accY( *this ) = y;
945  accZ( *this ) = z;
946 
947  return;
948  }
949 
952 
954  setBeamTiltXZ )
956  setBeamTiltYZ )
957 
959  setBeamStatus )
960 
961 
963  static const SG::AuxElement::Accessor< float >
964  accBeamSpotWeight( "beamSpotWeight" );
965 
967  return accBeamSpotWeight.isAvailable( *this );
968  }
969 
971  // If the value is not available, then return 1.0
972  if( ! hasBeamSpotWeight() ) return 1.0f;
973  return accBeamSpotWeight( *this );
974  }
975 
977  accBeamSpotWeight( *this ) = value;
978  return;
979  }
980 
981 
982  //
984 
985  StoreGateSvc* EventInfo_v1::evtStore() const {
986 
987  return m_evtStore;
988  }
989 
990  void EventInfo_v1::setEvtStore( StoreGateSvc* svc ) {
991 
992  m_evtStore = svc;
993  return;
994  }
995 
997 
998  // Check if the ElementLink variable is available, and writable:
999  if( linkAcc.isAvailableWritable( *this ) ) {
1000  // Prepare the ElementLink objects for ROOT I/O:
1001  std::vector< ElementLink< EventInfoContainer_v1 > >::iterator
1002  el_itr = linkAcc( *this ).begin();
1003  std::vector< ElementLink< EventInfoContainer_v1 > >::iterator
1004  el_end = linkAcc( *this ).end();
1005  for( ; el_itr != el_end; ++el_itr ) {
1006  el_itr->toPersistent();
1007  }
1008  }
1009 
1010  return;
1011  }
1012 
1019 
1020  m_streamTags.reset();
1021  m_subEvents.reset();
1022 #ifdef XAOD_STANDALONE
1023  m_evtStore = nullptr;
1024 #else
1026 #endif
1027 
1028  if( usingStandaloneStore() ) {
1029  setStore( ( SG::IAuxStore* ) nullptr );
1030  }
1031 
1032  return;
1033  }
1034 
1054  std::ostream& operator<< ( std::ostream& out,
1055  const xAOD::EventInfo_v1& ei ) {
1056 
1057  // Get the current state of the stream:
1058  const char fillChar = out.fill();
1059  const std::ios_base::fmtflags flags = out.flags();
1060  const std::streamsize width = out.width();
1061 
1062  // Do the printout:
1063  out << "[Run,Evt,Lumi,Time,BunchCross,DetMask] = ["
1064  << ei.runNumber()
1065  << "," << ei.eventNumber()
1066  << "," << ei.lumiBlock()
1067  << "," << ei.timeStamp()
1068  << ":" << ei.timeStampNSOffset()
1069  << "," << ei.bcid()
1070  << ",0x" << std::hex << std::setw( 16 ) << std::setfill( '0' )
1071  << ei.detectorMask()
1072  << "]";
1073 
1074  // Restore the original state of the stream:
1075  out.fill( fillChar );
1076  out.flags( flags );
1077  out.width( width );
1078 
1079  // Return the stream:
1080  return out;
1081  }
1082 
1090  std::ostream& operator<<( std::ostream &out,
1092 
1093  // Get the current state of the stream:
1094  const char fillChar = out.fill();
1095  const std::ios_base::fmtflags flags = out.flags();
1096  const std::streamsize width = out.width();
1097 
1098  // Do the printout:
1099  out << std::hex << std::setw( 16 ) << std::setfill( '0' );
1100  out << id.lowBits;
1101  out << id.highBits;
1102 
1103  // Restore the original state of the stream:
1104  out.fill( fillChar );
1105  out.flags( flags );
1106  out.width( width );
1107 
1108 
1109  // Return the stream:
1110  return out;
1111  }
1112 
1122 
1123  return a.lowBits == b.lowBits && a.highBits == b.highBits;
1124 
1125  }
1126 
1127 } // namespace xAOD
xAOD::EventInfo_v1::operator=
EventInfo_v1 & operator=(const EventInfo_v1 &rhs)
Assignment operator.
Definition: EventInfo_v1.cxx:96
EventInfoAccessors_v1.h
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
CurrentEventStore.h
Hold a pointer to the current event store.
xAOD::EventInfo_v1::detectorMask3
uint32_t detectorMask3() const
Bit field indicating which TTC zones are present in the event.
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
xAOD::EventInfo_v1::setSubEvents
void setSubEvents(const std::vector< SubEvent > &value)
Set the pileup events that were used in the simulation.
Definition: EventInfo_v1.cxx:607
xAOD::EventInfo_v1::DetDescrTags_t
std::vector< std::pair< std::string, std::string > > DetDescrTags_t
Type of the detector description tags.
Definition: EventInfo_v1.h:124
xAOD::EventInfo_v1::PileUp_NTYPES
@ PileUp_NTYPES
Definition: EventInfo_v1.h:272
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::EventInfo_v1::SubEvent::typeName
const std::string & typeName() const
The string name of the type.
Definition: EventInfo_v1.cxx:465
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::EventInfo_v1::EventInfo_v1
EventInfo_v1()
Default constructor.
Definition: EventInfo_v1.cxx:82
xAOD::EventInfo_v1::PileUpMixtureID
Unique pile-up mixture identifier definition.
Definition: EventInfo_v1.h:243
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
xAOD::EventInfo_v1::beamTiltXZ
float beamTiltXZ() const
The beam's tilt in radians in XZ.
xAOD::EventInfo_v1::setDetectorMask3
void setDetectorMask3(uint32_t value)
Set the bit field indicating with TTC timezones were present.
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
AuxStoreAccessorMacros.h
xAOD::EventInfo_v1::toPersistent
void toPersistent()
Prepare the object for writing.
Definition: EventInfo_v1.cxx:996
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::EventInfo_v1::detectorMaskExt
uint64_t detectorMaskExt() const
Bit field indicating which TTC zones are present in the event.
Definition: EventInfo_v1.cxx:164
index
Definition: index.py:1
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
xAOD::EventInfo_v1::HighPtMinimumBias
@ HighPtMinimumBias
High pT Minimum bias pileup event.
Definition: EventInfo_v1.h:270
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition: EventType.h:92
xAOD::EventInfo_v1::MinimumBias
@ MinimumBias
(Low pT) Minimum bias pileup event
Definition: EventInfo_v1.h:267
xAODEventInfoPrivate::operator<<
std::ostream & operator<<(std::ostream &out, const std::set< T > &s)
Convenience operator for printing the contents of sets.
Definition: EventInfo_v1.cxx:49
xAOD::EventInfo_v1::updateEventFlagBit
bool updateEventFlagBit(const EventFlagSubDet subDet, const size_t bit) const
Change detector flags with update semantics.
Definition: EventInfo_v1.cxx:746
xAOD::EventInfo_v1::PileUpMixtureID::lowBits
uint64_t lowBits
Definition: EventInfo_v1.h:244
xAOD::EventInfo_v1::clearSubEvents
void clearSubEvents()
Clear all the currently held sub-events.
Definition: EventInfo_v1.cxx:647
xAOD::EventInfo_v1::setBeamPos
void setBeamPos(float x, float y, float z)
Set the beam spot position.
Definition: EventInfo_v1.cxx:916
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
xAOD::EventInfo_v1::beamTiltYZ
float beamTiltYZ() const
The beam's tilt in radians in YZ.
xAOD::eventFlagsAccessorsV1
const SG::AtomicDecorator< uint32_t > * eventFlagsAccessorsV1(EventInfo_v1::EventFlagSubDet subDet)
Helper function for accessing event flag variables.
Definition: EventInfoAccessors_v1.cxx:34
xAOD::EventInfo_v1::PileUpType
PileUpType
Enumerator describing the types of pileup events.
Definition: EventInfo_v1.h:264
xAOD::EventInfo_v1::eventTypeBitmask
uint32_t eventTypeBitmask() const
The event type bitmask.
xAOD::EventInfo_v1::beamPosSigmaX
float beamPosSigmaX() const
The width of the beam spot in the X direction.
xAOD::EventInfo_v1::SubEvent::link
const ElementLink< EventInfoContainer_v1 > & link() const
Get a link to the EventInfo object describing the pileup event.
Definition: EventInfo_v1.cxx:496
athena.value
value
Definition: athena.py:122
SG::AuxElement::usingStandaloneStore
bool usingStandaloneStore() const
Test to see if this object is currently using a standalone store.
Definition: AuxElement.cxx:270
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
SG::CurrentEventStore::store
static IProxyDict * store()
Fetch the current store.
xAOD::EventInfo_v1::NotSet
@ NotSet
The flag was not set to anything.
Definition: EventInfo_v1.h:347
xAOD::EventInfo_v1::ZeroBias
@ ZeroBias
Zero bias pileup event.
Definition: EventInfo_v1.h:271
xAOD::detectorMask1
setEventNumber setTimeStamp setBCID detectorMask1
Definition: EventInfo_v1.cxx:137
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
xAOD::EventInfo_v1::StreamTag::StreamTag
StreamTag(const std::string &name, const std::string &type, bool obeysLumiblock, const std::set< uint32_t > &robs=std::set< uint32_t >(), const std::set< uint32_t > &dets=std::set< uint32_t >())
Constructor giving all relevant information to the object.
atn_test_sgProducerConsumerDataPool_jobOptions.end
end
Definition: atn_test_sgProducerConsumerDataPool_jobOptions.py:25
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::EventInfo_v1::SubEvent::ptr
const EventInfo_v1 * ptr() const
Get a pointer to the EventInfo object describing the pileup event.
Definition: EventInfo_v1.cxx:501
xAOD::EventInfo_v1::setBeamPosSigma
void setBeamPosSigma(float x, float y, float z)
Set the size of the beam spot.
Definition: EventInfo_v1.cxx:935
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
xAOD::EventInfo_v1::timeStampNSOffset
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
xAOD::EventInfo_v1::makeSubEvents
std::vector< EventInfo_v1::SubEvent > makeSubEvents() const
Definition: EventInfo_v1.cxx:523
x
#define x
xAOD::eventFlagsConstAccessorsV1
const SG::AtomicConstAccessor< uint32_t > * eventFlagsConstAccessorsV1(EventInfo_v1::EventFlagSubDet subDet)
Helper function for accessing event flag variables, for const access.
Definition: EventInfoAccessors_v1.cxx:58
xAOD::mcChannelNumber
mcChannelNumber
Definition: EventInfo_v1.cxx:197
xAOD::EventInfo_v1::updateEventFlags
bool updateEventFlags(const EventFlagSubDet subDet, const uint32_t flags_in) const
Turn on a set of event flags for one particular sub-detector.
Definition: EventInfo_v1.cxx:792
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
xAOD::EventInfo_v1::beamPosX
float beamPosX() const
X coordinate of the beam spot position.
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
EventInfoContainer.h
SG::AuxElement::Accessor
SG::Accessor< T, ALLOC > Accessor
Definition: AuxElement.h:522
ExpressionParsing::isAvailable
bool isAvailable(const T_Aux &cont, SG::auxid_t auxid)
xAOD::EventInfo_v1::Error
@ Error
The sub-detector issued an error.
Definition: EventInfo_v1.h:349
xAOD::EventInfo_v1::SubEvent::time
int16_t time() const
Get the time wrt. the signal event (which has time() == 0)
Definition: EventInfo_v1.cxx:450
xAOD::EventInfo_v1::setBeamTiltYZ
void setBeamTiltYZ(float value)
Set the beam's tilt in radians in YZ.
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::EventInfo_v1::setBeamStatus
void setBeamStatus(uint32_t value)
Set the beam spot's status word.
xAOD::EventInfo_v1::beamStatus
uint32_t beamStatus() const
The beam spot's status word.
xAOD::EventInfo_v1::setEventFlags
bool setEventFlags(EventFlagSubDet subDet, uint32_t flags)
Set the event flags for a particular sub-detector.
Definition: EventInfo_v1.cxx:719
xAOD::EventInfo_v1::hasBeamSpotWeight
bool hasBeamSpotWeight() const
Check if weight for beam spot size reweighting exists.
Definition: EventInfo_v1.cxx:966
xAOD::EventInfo_v1::setEventFlagBit
bool setEventFlagBit(EventFlagSubDet subDet, size_t bit) const
Set one particular bit of one particular sub-detector.
Definition: EventInfo_v1.cxx:741
xAOD::EventInfo_v1::beamPosY
float beamPosY() const
Y coordinate of the beam spot position.
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
tags
std::vector< std::string > tags
Definition: hcg.cxx:102
xAOD::EventInfo_v1::detectorMask2
uint32_t detectorMask2() const
Bit field indicating which TTC zones are present in the event.
xAOD::EventInfo_v1::setErrorState
bool setErrorState(EventFlagSubDet subDet, EventFlagErrorState state)
Set the error state for a particular sub-detector.
Definition: EventInfo_v1.cxx:825
CxxUtils::stall
void stall()
Emit stall instruction for use in a spin loop.
Definition: stall.h:37
AtomicDecorator.h
Access an auxiliary variable atomically.
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:92
SG::AuxElement::setStore
void setStore(const SG::IConstAuxStore *store)
Set the store associated with this object.
Definition: AuxElement.cxx:221
z
#define z
xAOD::EventInfo_v1::setDetectorMask
void setDetectorMask(uint32_t mask0, uint32_t mask1)
Set the bit fields indicating with TTC timezones were present.
Definition: EventInfo_v1.cxx:149
xAOD::EventInfo_v1::Unknown
@ Unknown
Type not known/specified.
Definition: EventInfo_v1.h:265
SG::AuxElement::AuxElement
AuxElement()
Default constructor.
vector
Definition: MultiHisto.h:13
xAOD::EventInfo_v1::setDetectorMask0
void setDetectorMask0(uint32_t value)
Set the bit field indicating with TTC timezones were present.
python.HLT.CommonSequences.EventBuildingSequences.robs
robs
Definition: EventBuildingSequences.py:400
xAOD::EventInfo_v1::HaloGas
@ HaloGas
Halo-gas non-collision background.
Definition: EventInfo_v1.h:269
xAOD::EventInfo_v1::beamPosSigmaZ
float beamPosSigmaZ() const
The length of the beam spot in the Z direction.
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(xAOD::PixelCluster_v1, float, widthInEta, setWidthInEta) void xAOD
Definition: PixelCluster_v1.cxx:54
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
xAOD::EventInfo_v1::SubEvent::index
uint16_t index() const
Get the index of the sub-event.
Definition: EventInfo_v1.cxx:455
xAOD::EventInfo_v1::detectorMask
uint64_t detectorMask() const
Bit field indicating which TTC zones are present in the event.
Definition: EventInfo_v1.cxx:143
xAOD::EventInfo_v1::setBeamSpotWeight
void setBeamSpotWeight(float value)
Set weight for beam spot size reweighting.
Definition: EventInfo_v1.cxx:976
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
xAOD::EventInfo_v1::EventFlagErrorState
EventFlagErrorState
States that a given sub-detector could be in.
Definition: EventInfo_v1.h:346
xAOD::EventInfo_v1::setBeamPosSigmaXY
void setBeamPosSigmaXY(float value)
Set the beam spot shape's X-Y correlation.
stall.h
Emit stall instruction for use in a spin loop.
xAOD::EventInfo_v1::toTransient
void toTransient()
Cleanse the object after being read in.
Definition: EventInfo_v1.cxx:1018
xAOD::EventInfo_v1::setDetectorMask2
void setDetectorMask2(uint32_t value)
Set the bit field indicating with TTC timezones were present.
xAOD::EventInfo_v1::beamPosSigmaY
float beamPosSigmaY() const
The width of the beam spot in the Y direction.
xAOD::EventInfo_v1::addSubEvent
void addSubEvent(const SubEvent &subEvent)
Add one sub-event to the existing list.
Definition: EventInfo_v1.cxx:629
xAOD::EventInfo_v1::beamPosZ
float beamPosZ() const
Z coordinate of the beam spot position.
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
xAOD::EventInfo_v1::setDetectorMaskExt
void setDetectorMaskExt(uint32_t mask2, uint32_t mask3)
Set the bit fields indicating with TTC timezones were present.
Definition: EventInfo_v1.cxx:170
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
xAOD::EventInfo_v1::EventFlagSubDet
EventFlagSubDet
Sub-detector types for which we store event-level flags.
Definition: EventInfo_v1.h:331
PileUpType
For details on how the MC particles are defined and organized see https://twiki.cern....
Definition: PileUpType.h:33
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
test_pythinning.out
out
Definition: test_pythinning.py:94
python.HLT.CommonSequences.EventBuildingSequences.dets
dets
Definition: EventBuildingSequences.py:401
SG::AuxElement::operator=
AuxElement & operator=(const AuxElement &other)
Assignment.
python.CTPfragment.setLumiBlock
def setLumiBlock(rob, lb)
Definition: CTPfragment.py:89
xAOD::timeStamp
setEventNumber timeStamp
Definition: EventInfo_v1.cxx:128
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
SG::IAuxStore
Interface for non-const operations on an auxiliary store.
Definition: IAuxStore.h:51
xAOD::EventInfo_v1::m_evtStore
StoreGateSvc * m_evtStore
Transient pointer to the StoreGateSvc instance associated with the event (Needed for pile-up digitisa...
Definition: EventInfo_v1.h:518
xAOD::EventInfo_v1::PileUpInt2Type
static PileUpType PileUpInt2Type(unsigned short typ)
Convert int to PileUpType enum value.
Definition: EventInfo_v1.cxx:672
xAOD::EventInfo_v1::Signal
@ Signal
The signal event.
Definition: EventInfo_v1.h:266
xAOD::EventInfo_v1::eventFlags
uint32_t eventFlags(EventFlagSubDet subDet) const
Get the event flags for a particular sub-detector.
Definition: EventInfo_v1.cxx:697
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
xAOD::EventInfo_v1::Warning
@ Warning
The sub-detector issued a warning.
Definition: EventInfo_v1.h:348
xAOD::EventInfo_v1::resetEventFlagBit
bool resetEventFlagBit(EventFlagSubDet subDet, size_t bit)
Reset one particular bit of one particular sub-detector.
Definition: EventInfo_v1.cxx:772
xAOD::EventInfo_v1::beamPosSigmaXY
float beamPosSigmaXY() const
The beam spot shape's X-Y correlation.
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
xAOD::EventInfo_v1::m_streamTags
CxxUtils::CachedValue< std::vector< StreamTag > > m_streamTags
Cached stream tag objects.
Definition: EventInfo_v1.h:511
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
SG::IAuxElement::m_index
size_t m_index
The index of this element within its container.
Definition: IAuxElement.h:128
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::EventInfo_v1::SubEvent::type
PileUpType type() const
Get the type of the pileup event.
Definition: EventInfo_v1.cxx:460
xAOD::EventInfo_v1::setBeamTiltXZ
void setBeamTiltXZ(float value)
Set the beam's tilt in radians in XZ.
xAOD::EventInfo_v1::Cavern
@ Cavern
Cavern background pileup event.
Definition: EventInfo_v1.h:268
AUXSTORE_PRIMITIVE_GETTER
#define AUXSTORE_PRIMITIVE_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a primitive auxiliary property.
Definition: AuxStoreAccessorMacros.h:59
xAOD::EventInfo_v1::errorState
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Definition: EventInfo_v1.cxx:817
xAOD::EventInfo_v1::timeStamp
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
xAOD::pileUpMixtureIDHighBits
pileUpMixtureIDHighBits
Definition: EventInfo_v1.cxx:418
xAOD::EventInfo_v1::isEventFlagBitSet
bool isEventFlagBitSet(EventFlagSubDet subDet, size_t bit) const
Check one particular bit of one particular sub-detector.
Definition: EventInfo_v1.cxx:703
xAOD::EventInfo_v1::updateErrorState
bool updateErrorState(const EventFlagSubDet subDet, const EventFlagErrorState state) const
Update the error state for one particular sub-detector.
Definition: EventInfo_v1.cxx:856
xAOD::detectorMask3
setEventNumber setTimeStamp setBCID setDetectorMask1 detectorMask3
Definition: EventInfo_v1.cxx:141
xAOD::JetConstituentVector::iterator
Definition: JetConstituentVector.h:121
xAOD::EventInfo_v1::PileUpType2Name
static const std::string & PileUpType2Name(PileUpType typ)
Convert PileUpType enum value to string.
Definition: EventInfo_v1.cxx:658
xAOD::operator==
bool operator==(const xAOD::EventInfo_v1::PileUpMixtureID &a, const xAOD::EventInfo_v1::PileUpMixtureID &b)
This operator is provided to make it convenient to compare two instances of PileUpMixtureID directly.
Definition: EventInfo_v1.cxx:1120
xAOD::EventInfo_v1::m_subEvents
CxxUtils::CachedValue< std::vector< SubEvent > > m_subEvents
Cached sub-event objects.
Definition: EventInfo_v1.h:513
xAOD::EventInfo_v1::setDetectorMask1
void setDetectorMask1(uint32_t value)
Set the bit field indicating with TTC timezones were present.
xAOD::EventInfo_v1::subEvents
const std::vector< SubEvent > & subEvents() const
Get the pileup events that were used in the simulation.
Definition: EventInfo_v1.cxx:596
SG::AtomicDecorator
Access an auxiliary variable atomically.
Definition: AtomicDecorator.h:44
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
SubEvent
xAOD::EventInfo::SubEvent SubEvent
Definition: PileUpMTAlg.cxx:34
xAODEventInfoPrivate
Definition: EventInfo_v1.cxx:26
StoreGateSvc.h
xAOD::mcEventWeights
setMCChannelNumber mcEventWeights
Definition: EventInfo_v1.cxx:201
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition: EventInfo_v1.cxx:970
xAODEventInfoPrivate::pileupUnsetHook
void pileupUnsetHook()
Function that would be possible to use to debug what client is trying to access pileup values from an...
Definition: EventInfo_v1.cxx:57
xAOD::EventInfo_v1::SubEvent
Class describing the properties of one pileup sub-event.
Definition: EventInfo_v1.h:286
xAOD::operator<<
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.
Definition: RDataSource.cxx:53
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27
EventInfo_v1.h