|
ATLAS Offline Software
|
Go to the documentation of this file.
30 #include "EventInfo/EventInfo.h"
40 ISvcLocator* pSvcLocator):
42 m_partialCreate(false),
43 m_readOtherHalf(false),
44 m_readFirstHalf(false)
56 return StatusCode::SUCCESS;
86 for (
int i = 0;
i < 5; ++
i) {
88 col1->push_back(
data);
93 for (
int i = 10;
i < 15; ++
i) {
95 col2->push_back(
data);
99 for (
int i = 20;
i < 26; ++
i) {
106 col3->push_back(
data);
113 for (;
it != last; ++
it) {
120 for (;
it != last; ++
it) {
127 for (;
it != last; ++
it) {
133 for (
int i = 0;
i < 5; ++
i) {
135 col4->push_back(
data);
140 for (
int i = 10;
i < 15; ++
i) {
142 col5->push_back(
data);
148 for (;
it != last; ++
it) {
155 for (;
it != last; ++
it) {
169 for (;
it != last; ++
it) {
178 for (;
it != last; ++
it) {
209 for (
int i = 0;
i < 3; ++
i ) {
212 for (
int j = 0; j < 2; ++j ) {
213 CLHEP::HepMatrix*
mat =
new CLHEP::HepMatrix( 4 + j, 2 + 2*
i );
214 CLHEP::HepMatrix& matrx = *
mat;
215 for (
int i = 0;
i < matrx.num_row(); ++
i) {
216 for (
int j = 0; j < matrx.num_col(); ++j) {
226 HepGeom::Point3D<double>( 0, 1, 0),
227 HepGeom::Point3D<double>( 0, 0, 1),
228 HepGeom::Point3D<double>(-
i, 0, 0),
229 HepGeom::Point3D<double>( 0, 1, 0),
230 HepGeom::Point3D<double>( 0, 0, 1));
231 matrix->setTransform(trans1);
234 stream <<
"AthenaPoolTestMatrix_" <<
i;
239 const HepGeom::Point3D<double>& point =
matrix->point();
240 const HepGeom::Point3D<double>& point1 =
matrix->point1();
248 << point1.z() <<
" ");
249 const CLHEP::HepMatrix& smallMatrix =
matrix->smallMatrix();
250 ATH_MSG_DEBUG(
" Small matrix : ( " << smallMatrix.num_row() <<
", " << smallMatrix.num_col() <<
" ) " );
253 for (
int i = 0;
i < smallMatrix.num_row(); ++
i) {
254 for (
int j = 0; j < smallMatrix.num_col(); ++ j) {
255 stream << smallMatrix[
i][j] <<
", ";
259 nd += smallMatrix.num_row()*smallMatrix.num_col();
261 const CLHEP::HepMatrix& bigMatrix =
matrix->bigMatrix();
262 ATH_MSG_DEBUG(
" Big matrix : ( " << bigMatrix.num_row() <<
", " << bigMatrix.num_col() <<
" ) " );
265 for (
int i = 0;
i < bigMatrix.num_row(); ++
i) {
266 for (
int j = 0; j < bigMatrix.num_col(); ++ j) {
267 stream << bigMatrix[
i][j] <<
", ";
271 nd += bigMatrix.num_row()*bigMatrix.num_col();
274 for (
int i = 0;
i <
matrix->numberOfMatrices(); ++
i ) {
275 const CLHEP::HepMatrix& matrx =
matrix->matrix(
i );
276 ATH_MSG_DEBUG(
" ( " << matrx.num_row() <<
", " << matrx.num_col() <<
" ) " );
278 for (
int i = 0;
i < matrx.num_row(); ++
i) {
279 for (
int j = 0; j < matrx.num_col(); ++ j) {
285 nd += matrx.num_row()*matrx.num_col();
298 std::map<unsigned int, CLHEP::HepMatrix>& mp0 = mats[0];
299 std::map<unsigned int, CLHEP::HepMatrix>& mp1 = mats[1];
300 std::map<unsigned int, CLHEP::HepMatrix>::const_iterator itmp = mp0.begin();
302 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
305 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
308 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
311 << (*itmp).second.num_row() <<
", " << (*itmp).second.num_col() );
338 typedef std::vector<AthenaPoolTestMapData::Deposit> deposit_vec;
340 deposit_vec deposits;
344 for (
unsigned int j = 0; j < 10; ++j) {
345 for (
unsigned int i = 0;
i < 10; ++
i) {
348 deposit.second =
i + 20;
349 deposits.push_back(deposit);
357 AthenaPoolTestMap::const_iterator itm = tmap.begin();
358 AthenaPoolTestMap::const_iterator endm = tmap.end();
359 for (; itm != endm; ++itm) {
362 (*itm).second.deposits(deposits);
364 for (
unsigned int i = 0;
i < deposits.size(); ++
i) {
368 << deposits[
i].second <<
" ";
371 <<
" word " << (*itm).second.word()
372 <<
" Deposits: (barCode, evtIndx, wgt) " <<
stream.str());
380 const std::vector<dummy_B>&
b = dummyA->
dummy();
382 for (
unsigned int i = 0;
i <
b.size(); ++
i) {
383 const std::vector<dummy_C>&
c =
b[
i].dummy();
385 for (
unsigned int j = 0; j <
c.size(); ++j) {
395 const std::vector<const dummy_D*>&
d = dummyE->
dummy();
397 for (
unsigned int i = 0;
i <
d.size(); ++
i) {
414 <<
evt->event_ID()->run_number() <<
","
415 <<
evt->event_ID()->event_number() <<
":"
416 <<
evt->event_ID()->time_stamp() <<
"] " );
418 <<
evt->event_type()->user_type() <<
" weight 0: "
430 unsigned int flags = 0;
435 ATH_MSG_ERROR(
"Error setting flag: i, flags " <<
i <<
" " << MSG::hex <<
flags << MSG::dec );
464 ATH_MSG_DEBUG(
"Returned false for trying to set bit 29 for subDet " <<
i <<
" "
472 ATH_MSG_ERROR(
"Error setting error state: i, state " <<
i <<
" " << state );
475 ATH_MSG_DEBUG(
"Setting error state: i, state " <<
i <<
" " << state );
488 evt->event_ID()->event_number(),
502 std::vector<unsigned int> level1TriggerInfo;
503 level1TriggerInfo.push_back(14);
504 level1TriggerInfo.push_back(15);
505 std::vector<unsigned int> level2TriggerInfo;
506 level2TriggerInfo.push_back(10);
507 level2TriggerInfo.push_back(11);
508 std::vector<unsigned int> eventFilterInfo;
509 eventFilterInfo.push_back(12);
510 eventFilterInfo.push_back(13);
511 std::vector<TriggerInfo::StreamTag> streamTags;
523 auto newEvt = std::make_unique<EventInfo>(*
evt);
534 << pevt->
event_ID()->run_number() <<
","
535 << pevt->
event_ID()->event_number() <<
":"
536 << pevt->
event_ID()->time_stamp() <<
"] ");
553 stream <<
"EventFilterInfo ";
557 stream <<
"EventFilterInfo ";
572 for (;
it1 != end1; ++
it1) {
575 << (*it1).time() <<
" " << (*it1).index()
579 << sevt->
event_ID()->run_number() <<
","
580 << sevt->
event_ID()->event_number() <<
":"
581 << sevt->
event_ID()->time_stamp() <<
"] ");
585 <<
it1->time() <<
" " <<
it1->index());
591 return StatusCode::SUCCESS;
596 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
char data[hepevt_bytes_allocation_ATLAS]
bool isEventFlagBitSet(EventFlagSubDet subDet, unsigned char bit) const
check for a event flag bit for a particular sub-detector
std::string user_type(void) const
Access to user type.
Const iterator class for DataVector/DataList.
const std::vector< StreamTag > & streamTags() const
get stream tags
index_type eventIndex() const
float averageInteractionsPerCrossing() const
average interactions per crossing for all BCIDs - for out-of-time pile-up
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< std::map< unsigned int, CLHEP::HepMatrix > > matrixMaps_t
This class represents the "type of event" where the type is given by one or more "characteristics".
~AthenaPoolTestDataWriter()
Algorithm destructor.
Class definition for IAthenaPoolTestCollection.
Class definition for AthenaPoolTestA.
Simple class with int,int,float,double for testing pool i/o from Athena.
This class contains trigger related information.
This class provides general information about an event. It extends EventInfo with a list of sub-evts ...
#define ATH_MSG_VERBOSE(x)
Class definition for AthenaPoolTestB.
float mc_event_weight(unsigned int iweight=0) const
Access to MC weight.
Interface class for AthenaPoolTest i/o tests with DataVector.
EventFlagErrorState errorState(EventFlagSubDet subDet) const
return error state for a particular sub-detector
bool setEventFlagBit(EventFlagSubDet subDet, unsigned char bit, bool set=true)
Set a bit for an event flag of a particular sub detector.
const std::vector< number_type > & level1TriggerInfo() const
get level1 trigger info
DataVector< IAthenaPoolTestData > IAthenaPoolTestCollection
Simple class with HepGeom::Point3D<double> for testing pool i/o from Athena.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool setErrorState(EventFlagSubDet subDet, EventFlagErrorState errorState)
Set error state flag for a particular sub detector.
SubEvent::iterator beginSubEvt()
void setActualInteractionsPerCrossing(float interactions)
Setting the number of interactions per crossing:
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Simple class with two int's for testing pool i/o from Athena.
Class definition for AthenaPoolTestD.
virtual StatusCode initialize()
Algorithm initialize at begin of job.
unsigned int eventFlags(EventFlagSubDet subDet) const
event flags for a particular sub-detector
Class definition for AthenaPoolTestMatrix.
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old PileUpEventInfo
std::vector< HWIdentifier >::iterator it1
const std::vector< number_type > & level2TriggerInfo() const
get level2 trigger info
::StatusCode StatusCode
StatusCode definition for legacy code.
EventID * event_ID()
the unique identification of the event.
BooleanProperty m_readOtherHalf
For partial create read second half of collections.
Eigen::Affine3d Transform3D
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, const EventInfo *pse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
Class definition for AthenaPoolTestC.
std::pair< AthenaPoolTestMapDataLink, float > Deposit
virtual StatusCode execute()
Algorithm execute once per event.
Interface class for AthenaPoolTest i/o tests.
Test Algorithm for POOL I/O tests, writes AthenaPoolData objects to the transient store.
BooleanProperty m_partialCreate
Create only part of the collections.
Simple class with four int's divided among protected/private for testing pool i/o from Athena.
number_type level1TriggerType() const
get level1 trigger type
void setAverageInteractionsPerCrossing(float interactions)
average interactions per crossing for all BCIDs - for out-of-time pile-up
AthenaPoolTestDataWriter(const std::string &name, ISvcLocator *pSvcLocator)
Algorithm constructor.
virtual StatusCode finalize()
Algorithm finalize at end of job.
BooleanProperty m_readFirstHalf
For partial create read first half of collections.
test nested vectors - problem seen in root3/4 transition
This class contains trigger related information.
This class provides general information about an event. Event information is provided by the accessor...
const std::vector< const dummy_D * > & dummy() const
void set_mc_event_weight(float weight, unsigned int iweight=0, unsigned int nWeightsMax=0)
Add in MC weight. For more than 1 weight, add with iweight > 0.
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
number_type extendedLevel1ID() const
get extended level1 ID
const std::vector< number_type > & eventFilterInfo() const
get event filter trigger info
void set_user_type(const std::string &user_type)
Add user (string) type.
Test derived class that contains a list of parent classes.
std::list< SubEvent >::const_iterator const_iterator
TriggerInfo * trigger_info()
trigger information (ptr may be NULL)
bool setEventFlags(EventFlagSubDet subDet, unsigned int flags)
Set event flag for a particular sub detector - maximun size is 28 bits.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
const std::vector< dummy_B > & dummy() const
Simple class with various CLHEP classes for testing pool i/o from Athena.
number_type statusElement() const
get status element
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
SubEvent::iterator endSubEvt()
float actualInteractionsPerCrossing() const
Access to number of interactions per crossing: