ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloPprDisabledChannelContainerRun2 Class Reference

Container of L1CaloPprDisabledChannelRun2 objects, inherit from the abstract base class AbstractL1CaloConditionContainer. More...

#include <L1CaloPprDisabledChannelContainerRun2.h>

Inheritance diagram for L1CaloPprDisabledChannelContainerRun2:
Collaboration diagram for L1CaloPprDisabledChannelContainerRun2:

Public Types

enum  eCoolFolders
typedef std::map< unsignedint, L1CaloPprDisabledChannel >::const_iterator const_iterator

Public Member Functions

 L1CaloPprDisabledChannelContainerRun2 ()
 L1CaloPprDisabledChannelContainerRun2 (const std::map< L1CaloPprDisabledChannelContainerRun2::eCoolFolders, std::string > &folderKeysMap)
virtual ~L1CaloPprDisabledChannelContainerRun2 ()
virtual std::vector< std::string > coolInputKeys () const
virtual std::string coolOutputKey () const
virtual DataObject * makePersistent () const
virtual void makeTransient (const std::map< std::string, const CondAttrListCollection * > &condAttrListCollectionMap)
virtual void makeTransient (const std::map< std::string, const AthenaAttributeList * > &condAttributeList)
const L1CaloPprDisabledChannelpprDisabledChannel (unsigned int channelId) const
const L1CaloPprDisabledChannelpprDisabledChannel (const L1CaloCoolChannelId &channelId) const
void addPprDisabledChannel (unsigned int channelId, const L1CaloPprDisabledChannel &pprDisabledChannel)
void addPprDisabledChannel (const L1CaloCoolChannelId &channelId, const L1CaloPprDisabledChannel &pprDisabledChannel)
L1CaloPprDisabledChannelMap::const_iterator begin () const
L1CaloPprDisabledChannelMap::const_iterator end () const
virtual void clear ()
void dump () const
std::string specificationName (int specId) const
std::string specificationType (int specId) const
void addSpecification (int specId, const std::string &specName, const std::string &specType)
coral::AttributeListSpecification * createAttributeListSpecification () const
virtual std::string conditionType () const

Private Types

enum  eAttrSpecification {
  eChanDeadErrorCode , eChanCalibErrorCode , eCaloDisableMask , eEtaDisableMask ,
  ePhiDisableMask , eChanDisableMask , eNoiseCut , eDisabledBits
}

Private Member Functions

std::string coolFolderKey (L1CaloPprDisabledChannelContainer::eCoolFolders efolder) const

Private Attributes

std::map< L1CaloPprDisabledChannelContainerRun2::eCoolFolders, std::string > m_coolFoldersKeysMap
L1CaloPprDisabledChannelMap m_mPprDisabledChannelMap
std::map< L1CaloPprDisabledChannelContainer::eCoolFolders, std::string > m_mCoolFoldersKeysMap

Detailed Description

Container of L1CaloPprDisabledChannelRun2 objects, inherit from the abstract base class AbstractL1CaloConditionContainer.

Implement the IL1CaloPersistenceCapable interface.

Modified to work with the Run-2 database.

Author
Veit Scharf

Definition at line 29 of file L1CaloPprDisabledChannelContainerRun2.h.

Member Typedef Documentation

◆ const_iterator

Member Enumeration Documentation

◆ eAttrSpecification

◆ eCoolFolders

Constructor & Destructor Documentation

◆ L1CaloPprDisabledChannelContainerRun2() [1/2]

L1CaloPprDisabledChannelContainerRun2::L1CaloPprDisabledChannelContainerRun2 ( )

Definition at line 18 of file L1CaloPprDisabledChannelContainerRun2.cxx.

19 : AbstractL1CaloPersistentCondition("CondAttrListCollection") {
20
21 m_coolFoldersKeysMap[L1CaloPprDisabledChannelContainer::ePpmDeadChannels] = std::string("/TRIGGER/L1Calo/V1/Calibration/PpmDeadChannels");
22 m_coolFoldersKeysMap[L1CaloPprDisabledChannelContainer::ePprChanCalib] = std::string("/TRIGGER/L1Calo/V2/Calibration/Physics/PprChanCalib");
23 m_coolFoldersKeysMap[L1CaloPprDisabledChannelContainer::eDisabledTowers] = std::string("/TRIGGER/L1Calo/V1/Conditions/DisabledTowers");
24}
AbstractL1CaloPersistentCondition(const std::string &condType)
std::map< L1CaloPprDisabledChannelContainerRun2::eCoolFolders, std::string > m_coolFoldersKeysMap

◆ L1CaloPprDisabledChannelContainerRun2() [2/2]

L1CaloPprDisabledChannelContainerRun2::L1CaloPprDisabledChannelContainerRun2 ( const std::map< L1CaloPprDisabledChannelContainerRun2::eCoolFolders, std::string > & folderKeysMap)

Definition at line 26 of file L1CaloPprDisabledChannelContainerRun2.cxx.

27 : AbstractL1CaloPersistentCondition("CondAttrListCollection")
28 , m_coolFoldersKeysMap(folderKeysMap)
29{
30}

◆ ~L1CaloPprDisabledChannelContainerRun2()

virtual L1CaloPprDisabledChannelContainerRun2::~L1CaloPprDisabledChannelContainerRun2 ( )
inlinevirtual

Definition at line 39 of file L1CaloPprDisabledChannelContainerRun2.h.

39{};

Member Function Documentation

◆ addPprDisabledChannel() [1/2]

void L1CaloPprDisabledChannelContainer::addPprDisabledChannel ( const L1CaloCoolChannelId & channelId,
const L1CaloPprDisabledChannel & pprDisabledChannel )

Definition at line 49 of file L1CaloPprDisabledChannelContainer.cxx.

238 {
240}
void addPprDisabledChannel(unsigned int channelId, const L1CaloPprDisabledChannel &pprDisabledChannel)
const L1CaloPprDisabledChannel * pprDisabledChannel(unsigned int channelId) const

◆ addPprDisabledChannel() [2/2]

void L1CaloPprDisabledChannelContainer::addPprDisabledChannel ( unsigned int channelId,
const L1CaloPprDisabledChannel & pprDisabledChannel )

◆ addSpecification()

void AbstractL1CaloPersistentCondition::addSpecification ( int specId,
const std::string & specName,
const std::string & specType )
inherited

Definition at line 26 of file AbstractL1CaloPersistentCondition.cxx.

26 {
27 m_attrSpecificationNameMap[specId] = specName;
28 m_attrSpecificationTypeMap[specId] = specType;
29}

◆ begin()

L1CaloPprDisabledChannelMap::const_iterator L1CaloPprDisabledChannelContainer::begin ( ) const
inline

Definition at line 51 of file L1CaloPprDisabledChannelContainer.h.

51{ return m_mPprDisabledChannelMap.begin(); };

◆ clear()

void L1CaloPprDisabledChannelContainer::clear ( )
virtual

Reimplemented from L1CaloPprDisabledChannelContainer.

Definition at line 57 of file L1CaloPprDisabledChannelContainer.cxx.

249 {
251}

◆ conditionType()

virtual std::string AbstractL1CaloPersistentCondition::conditionType ( ) const
inlinevirtualinherited

◆ coolFolderKey()

std::string L1CaloPprDisabledChannelContainerRun2::coolFolderKey ( L1CaloPprDisabledChannelContainer::eCoolFolders efolder) const
privatevirtual

Reimplemented from L1CaloPprDisabledChannelContainer.

Definition at line 32 of file L1CaloPprDisabledChannelContainerRun2.cxx.

32 {
33
34 std::map<L1CaloPprDisabledChannelContainerRun2::eCoolFolders, std::string>::const_iterator it = m_coolFoldersKeysMap.find(efolder);
35 if(it!=m_coolFoldersKeysMap.end()) {
36 return it->second;
37 } else {
38 return std::string("");
39 }
40}

◆ coolInputKeys()

std::vector< std::string > L1CaloPprDisabledChannelContainerRun2::coolInputKeys ( ) const
virtual

Reimplemented from L1CaloPprDisabledChannelContainer.

Definition at line 42 of file L1CaloPprDisabledChannelContainerRun2.cxx.

42 {
43 std::vector<std::string> v;
47 return v;
48}
std::string coolFolderKey(L1CaloPprDisabledChannelContainer::eCoolFolders efolder) const

◆ coolOutputKey()

std::string L1CaloPprDisabledChannelContainerRun2::coolOutputKey ( ) const
virtual

Reimplemented from L1CaloPprDisabledChannelContainer.

Definition at line 50 of file L1CaloPprDisabledChannelContainerRun2.cxx.

50 {
51 return std::string("");
52}

◆ createAttributeListSpecification()

coral::AttributeListSpecification * AbstractL1CaloPersistentCondition::createAttributeListSpecification ( ) const
inherited

Definition at line 31 of file AbstractL1CaloPersistentCondition.cxx.

31 {
32
33 coral::AttributeListSpecification* attrSpecification = new coral::AttributeListSpecification();
34
35 AttrSpecificationMap::const_iterator it_name = m_attrSpecificationNameMap.begin();
36 AttrSpecificationMap::const_iterator it_type = m_attrSpecificationTypeMap.begin();
37
38 for(;it_name!=m_attrSpecificationNameMap.end();++it_name,++it_type) {
39 attrSpecification->extend(it_name->second, it_type->second);
40 }
41 return attrSpecification;
42}

◆ dump()

void L1CaloPprDisabledChannelContainer::dump ( ) const

Definition at line 59 of file L1CaloPprDisabledChannelContainer.cxx.

242 {
244 for(;it!=this->end();++it) {
245 std::cout << " * item: " <<it->first << " => "<<it->second <<std::endl;
246 }
247}
L1CaloPprDisabledChannelMap::const_iterator end() const
L1CaloPprDisabledChannelMap::const_iterator begin() const
std::map< unsignedint, L1CaloPprDisabledChannel >::const_iterator const_iterator

◆ end()

L1CaloPprDisabledChannelMap::const_iterator L1CaloPprDisabledChannelContainer::end ( ) const
inline

Definition at line 52 of file L1CaloPprDisabledChannelContainer.h.

52{ return m_mPprDisabledChannelMap.end(); };

◆ makePersistent()

DataObject * L1CaloPprDisabledChannelContainer::makePersistent ( ) const
virtual

Reimplemented from L1CaloPprDisabledChannelContainer.

Definition at line 40 of file L1CaloPprDisabledChannelContainer.cxx.

78 {
79 return 0;
80/*
81 if(m_mPprDisabledChannelMap.size()==0) return 0;
82
83 // Create AttributeListSpecification according to the attributes to be recorded
84 // this is required to create the AttributeList objs
85 coral::AttributeListSpecification* attrSpecification = this->createAttributeListSpecification();
86 if(!attrSpecification->size()) return NULL;
87
88 CondAttrListCollection* attrListCollection = new CondAttrListCollection(true);
89
90 L1CaloPprDisabledChannelMap::const_iterator pos = m_mPprDisabledChannelMap.begin();
91 for(;pos!=m_mPprDisabledChannelMap.end();++pos) {
92 const unsigned int channelId = pos->first;
93 const L1CaloPprDisabledChannel& p = pos->second;
94
95 AthenaAttributeList attrList(*attrSpecification);
96
97 // Set value of each row for the current channel
98 attrList[ this->specificationName(eChanDeadErrorCode) ].setValue(p.deadErrorCode().errorCode());
99 attrList[ this->specificationName(eChanCalibErrorCode) ].setValue(p.calibErrorCode.errorCode());
100
101 attrListCollection->add(channelId, attrList);
102 }
103
104 return (DataObject*) attrListCollection;
105*/
106}

◆ makeTransient() [1/2]

void AbstractL1CaloPersistentCondition::makeTransient ( const std::map< std::string, const AthenaAttributeList * > & condAttributeList)
virtual

Reimplemented from L1CaloPprDisabledChannelContainer.

Definition at line 43 of file AbstractL1CaloPersistentCondition.cxx.

21 {
22 std::cout << "ERROR - The makeTransient(const map<std::string, const AthenaAttributeList*>) method you are calling is not implemented by the current class !" << std::endl;
23 return;
24}

◆ makeTransient() [2/2]

void L1CaloPprDisabledChannelContainer::makeTransient ( const std::map< std::string, const CondAttrListCollection * > & condAttrListCollectionMap)
virtual

Reimplemented from L1CaloPprDisabledChannelContainer.

Definition at line 44 of file L1CaloPprDisabledChannelContainer.cxx.

108 {
109
112
113 if (condAttrListCollectionMap.empty()) return;
114
115 // Reading cool paths and reading attributes
116
117 for (const auto& [name, coll] : condAttrListCollectionMap) {
118 if (name.find("PpmDeadChannels")!=std::string::npos){
119 auto it_deadChannelsAttrListCollection = condAttrListCollectionMap.find(name);
120 const CondAttrListCollection* deadChannelsAttrListCollection = it_deadChannelsAttrListCollection->second;
121
122
123 //Dead channel
124 it_attr = deadChannelsAttrListCollection->begin();
125 it_attrE = deadChannelsAttrListCollection->end();
126 for(;it_attr!=it_attrE;++it_attr) {
127
128 const coral::AttributeList& attrList(it_attr->second);
129
130 // Get value of each row for the current channel
132
133 ChanDeadErrorCode errorCode(attrList[ this->specificationName(eChanDeadErrorCode) ].data<unsigned int>());
134
135 unsigned int noiseCut = attrList[this->specificationName(eNoiseCut)].data<unsigned int>();
136
137 // test if the channel is really bad for the given IOV
138 if(!errorCode.chanValid() || noiseCut > 0) {
139 L1CaloPprDisabledChannelMap::iterator it_chan = m_mPprDisabledChannelMap.find(chanNum);
140 if(it_chan==m_mPprDisabledChannelMap.end()) {
141 m_mPprDisabledChannelMap[chanNum] = L1CaloPprDisabledChannel(chanNum);
142 }
143 m_mPprDisabledChannelMap[chanNum].deadErrorCode(errorCode);
144 m_mPprDisabledChannelMap[chanNum].setNoiseCut(noiseCut);
145 }
146 }
147
148
149
150 } // End PpmDeadChannels
151
152 if(name.find("PprChanCalib")!=std::string::npos){
153 auto it_calibChannelsAttrListCollection = condAttrListCollectionMap.find(name);
154 const CondAttrListCollection* calibChannelsAttrListCollection = it_calibChannelsAttrListCollection->second;
155
156
157
158 // calib channels
159 it_attr = calibChannelsAttrListCollection->begin();
160 it_attrE = calibChannelsAttrListCollection->end();
161 for(;it_attr!=it_attrE;++it_attr) {
162
163 const coral::AttributeList& attrList(it_attr->second);
164
165 // Get value of each row for the current channel
167
168 ChanCalibErrorCode errorCode(attrList[ this->specificationName(eChanCalibErrorCode) ].data<unsigned int>());
169
170 // test if the channel is correctly calibrated for the given IOV
171 if(!errorCode.chanValid()) {
172 L1CaloPprDisabledChannelMap::iterator it_chan = m_mPprDisabledChannelMap.find(chanNum);
173 if(it_chan==m_mPprDisabledChannelMap.end()) {
174 m_mPprDisabledChannelMap[chanNum] = L1CaloPprDisabledChannel(chanNum);
175 }
176 m_mPprDisabledChannelMap[chanNum].calibErrorCode(errorCode);
177 }
178 }
179
180
181
182
183 } // End PprChanCalib
184
185 if(name.find("DisabledTowers")!=std::string::npos){
186 auto it_disabledTowersAttrListCollection = condAttrListCollectionMap.find(name);
187 const CondAttrListCollection* disabledTowersAttrListCollection = it_disabledTowersAttrListCollection->second;
188
189 // disabled towers
190 it_attr = disabledTowersAttrListCollection->begin();
191 it_attrE = disabledTowersAttrListCollection->end();
192 for(;it_attr!=it_attrE;++it_attr) {
193
194 const coral::AttributeList& attrList(it_attr->second);
195
196 // Get value of each row for the current channel
198
199 unsigned int disabledBits = attrList[this->specificationName(eDisabledBits)].data<unsigned int>();
200
201 if(disabledBits) {
202 L1CaloPprDisabledChannelMap::iterator it_chan = m_mPprDisabledChannelMap.find(chanNum);
203 if(it_chan==m_mPprDisabledChannelMap.end()) {
204 m_mPprDisabledChannelMap[chanNum] = L1CaloPprDisabledChannel(chanNum);
205 }
206 m_mPprDisabledChannelMap[chanNum].setDisabledBits(disabledBits);
207 }
208 }
209
210
211
212
213 } // End DisabledTowers
214
215 } // End cool loop
216
217
218
219
220
221
222}
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
ChanAttrListMap::const_iterator const_iterator

◆ pprDisabledChannel() [1/2]

const L1CaloPprDisabledChannel * L1CaloPprDisabledChannelContainer::pprDisabledChannel ( const L1CaloCoolChannelId & channelId) const

Definition at line 47 of file L1CaloPprDisabledChannelContainer.cxx.

230 {
231 return this->pprDisabledChannel(channelId.id());
232}

◆ pprDisabledChannel() [2/2]

const L1CaloPprDisabledChannel * L1CaloPprDisabledChannelContainer::pprDisabledChannel ( unsigned int channelId) const

Definition at line 46 of file L1CaloPprDisabledChannelContainer.cxx.

224 {
225 L1CaloPprDisabledChannelMap::const_iterator pos = m_mPprDisabledChannelMap.find(channelId);
226 if(pos==m_mPprDisabledChannelMap.end()) return 0;
227 else return &(pos->second);
228}

◆ specificationName()

std::string AbstractL1CaloPersistentCondition::specificationName ( int specId) const
inherited

Definition at line 44 of file AbstractL1CaloPersistentCondition.cxx.

44 {
45 return m_attrSpecificationNameMap.find(specId)->second;
46}

◆ specificationType()

std::string AbstractL1CaloPersistentCondition::specificationType ( int specId) const
inherited

Definition at line 48 of file AbstractL1CaloPersistentCondition.cxx.

48 {
49 return m_attrSpecificationTypeMap.find(specId)->second;
50}

Member Data Documentation

◆ m_coolFoldersKeysMap

std::map<L1CaloPprDisabledChannelContainerRun2::eCoolFolders, std::string> L1CaloPprDisabledChannelContainerRun2::m_coolFoldersKeysMap
private

Definition at line 58 of file L1CaloPprDisabledChannelContainerRun2.h.

◆ m_mCoolFoldersKeysMap

std::map<L1CaloPprDisabledChannelContainer::eCoolFolders, std::string> L1CaloPprDisabledChannelContainer::m_mCoolFoldersKeysMap
privateinherited

Definition at line 65 of file L1CaloPprDisabledChannelContainer.h.

◆ m_mPprDisabledChannelMap

L1CaloPprDisabledChannelMap L1CaloPprDisabledChannelContainer::m_mPprDisabledChannelMap
privateinherited

Definition at line 64 of file L1CaloPprDisabledChannelContainer.h.


The documentation for this class was generated from the following files: