ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_RawDataContainer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ALFA_RAWDATACONTAINER_H
6#define ALFA_RAWDATACONTAINER_H
7
8#include <vector>
9#include <string>
13//#include "EventContainers/IdentifiableContainer.h"
14
18
19
20//class ALFA_RawDataContainer : public IdentifiableContainer<ALFA_RawDataCollection> {
21class ALFA_RawDataContainer : public DataVector<ALFA_RawDataCollection> {
22
23 private:
24
25 // Raw data word and word header
26
27 uint32_t m_wordMarker;
28
29 // I added runNum, runType, DetEventType
30 // modification based on page19 MROD data format document and on ALFA dumped data file
31 //uint32_t m_dataWord;
32
33 // Data members
34 uint16_t m_subdetId; // Sub-detector Id
35 uint16_t m_mrodId; // MROD Id
36 uint32_t m_lvl1Id; // Lvl1 Id
37 uint16_t m_ecrId; // ECR Id
38 uint16_t m_bcId; // Bunch crossing Id
39 uint32_t m_runNum; // Run sequence number
40 uint16_t m_runType; // Run Type
41 uint16_t m_triggerTypeId; // Trigger type Id
42 uint32_t m_DetEventType; // Detector Event Type
43
44 // Data words in the ROD header
45
46 // Full Event marker
47 static const uint32_t s_FullEVmarker = 0xaa1234aa;
48 // ROB marker
49 static const uint32_t s_ROBmarker = 0xdd1234dd;
50 // ROD marker
51 static const uint32_t s_RODmarker = 0xee1234ee;
52
53 static const uint32_t s_RODheadersize = 0x00000009;
54 static const uint32_t s_RODversion = 0x03010000;
55
56 //Time Stamp
57 uint32_t m_TimeStamp;
58 //Time Stamp ns
59 uint32_t m_TimeStampns;
60 //Bunch Crossing ID
61 uint32_t m_BCId;
62 //LumiBlock ID
63 uint32_t m_LumiBlock;
64 //Lvl1 trigger pattern (fired items in lvl1 trigger)
65 std::vector<bool> m_lvl1Pattern;
66 //Lvl2 trigger pattern (fired items in lvl2 trigger)
67 std::vector<bool> m_lvl2Pattern;
68 //EF pattern (fired items in EF)
69 std::vector<bool> m_efPattern;
70
71 public:
72
75
77
78 size_type digit_size() const ;
79
80 bool is_FullEVmarker() const {return m_wordMarker == s_FullEVmarker;};
81 bool is_ROBmarker() const {return m_wordMarker == s_ROBmarker;};
82 bool is_RODmarker() const {return m_wordMarker == s_RODmarker;};
83
84
85 // Retrieve decoded results
86 uint16_t subdetId() const {return m_subdetId;}
87 uint16_t mrodId() const {return m_mrodId;}
88 uint32_t runNum() const {return m_runNum;}
89 uint16_t runType() const {return m_runType;}
90 uint32_t lvl1Id() const {return m_lvl1Id;}
91 uint16_t ecrId() const {return m_ecrId;}
92 uint16_t bcId() const {return m_bcId;}
93 uint16_t trigtypeId() const {return m_triggerTypeId;}
94 uint32_t DetEventType() const {return m_DetEventType;}
95
96
97 void SetLvl1Pattern(const std::vector<bool>& tmplvl1_pattern);
98 void SetLvl2Pattern(const std::vector<bool>& tmplvl2_pattern);
99 void SetEFPattern(const std::vector<bool>& tmpef_pattern);
100 void SetTimeStamp(uint32_t tmpTimeStamp);
101 void SetTimeStampns(uint32_t tmpTimeStampns);
102 void SetLumiBlock(uint32_t tmpLumiBlock);
103 void SetBCId(uint32_t tmpBCId);
104
105 const std::vector<bool>& GetLvl1Pattern_POT() const {return m_lvl1Pattern;};
106 const std::vector<bool>& GetLvl2Pattern_POT() const {return m_lvl2Pattern;};
107 const std::vector<bool>& GetEFPattern_POT() const {return m_efPattern;};
108 uint32_t GetTimeStamp() const {return m_TimeStamp;};
109 uint32_t GetTimeStampns() const {return m_TimeStampns;};
110 uint32_t GetLumiBlock() const {return m_LumiBlock;};
111 uint32_t GetBCId() const {return m_BCId;};
112
113 private:
114
115 // Private functions
116 void setZero();
117
118};
119
120CLASS_DEF( ALFA_RawDataContainer , 1083669809 , 0 ) // da rimettere a posto prima di sottomettere in SVN
121
122
123#endif // ALFA_RAWDATACONTAINER_H
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
This container provides acces to the PMF RDOs.
static const uint32_t s_RODmarker
void SetTimeStampns(uint32_t tmpTimeStampns)
void SetTimeStamp(uint32_t tmpTimeStamp)
static const uint32_t s_ROBmarker
const std::vector< bool > & GetEFPattern_POT() const
void SetLvl2Pattern(const std::vector< bool > &tmplvl2_pattern)
void SetBCId(uint32_t tmpBCId)
std::vector< bool > m_efPattern
void SetLvl1Pattern(const std::vector< bool > &tmplvl1_pattern)
void SetLumiBlock(uint32_t tmpLumiBlock)
std::vector< bool > m_lvl1Pattern
const std::vector< bool > & GetLvl1Pattern_POT() const
static const uint32_t s_FullEVmarker
static const uint32_t s_RODheadersize
static const uint32_t s_RODversion
const std::vector< bool > & GetLvl2Pattern_POT() const
std::vector< bool > m_lvl2Pattern
ALFA_RawDataCollection::size_type size_type
void SetEFPattern(const std::vector< bool > &tmpef_pattern)
typename DataVectorBase< ALFA_RawData >::Base::size_type size_type
Definition DataVector.h:814
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)