ATLAS Offline Software
VP1RawDataColl_BCM_RDO.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Implementation of class VP1RawDataColl_BCM_RDO //
9 // //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: January 2009 //
12 // //
14 
24 
25 
26 //____________________________________________________________________
28 {
30 }
31 
32 //____________________________________________________________________
34 public:
36 };
37 
38 
39 //____________________________________________________________________
42 {
44 
45  connect(common->controller(),SIGNAL(useSpecialBCMHighAttMaterialChanged(bool)),
46  this,SLOT(setUseSpecialBCMHighAttMaterial(bool)));
47  setUseSpecialBCMHighAttMaterial(common->controller()->useSpecialBCMHighAttMaterial());
48 }
49 
50 //____________________________________________________________________
52 {
53  delete m_d;
54 }
55 
56 //____________________________________________________________________
58 {
59  VP1MaterialButton::setMaterialParameters( m, 0.3, 1.0, 0.95, 0.1 );
60 }
61 
62 //____________________________________________________________________
64 {
66  message("BCM geometry not configured in job");
67  return false;
68  }
69  const BCM_RDO_Container* rdoContainer;
70  if (!VP1SGAccessHelper(systemBase()).retrieve(rdoContainer,text())) {
71  message("Problems retrieving container with key "+text());
72  return false;
73  }
74 
75  //We collect multiple BCM_RawData objects in one VP1RawDataHandle.
76 
77  std::map<int,QList<const BCM_RawData*> > module2data;
78  std::map<int,QList<const BCM_RawData*> >::iterator it;
79 
80  BCM_RDO_Container::const_iterator itColl(rdoContainer->begin()), itCollE(rdoContainer->end());
81  for (;itColl!=itCollE;++itColl) {
82  if (!*itColl||(*itColl)->empty())
83  continue;
84  BCM_RDO_Collection::const_iterator itRDO((*itColl)->begin()), itRDOE((*itColl)->end());
85  for (;itRDO!=itRDOE;++itRDO) {
86  //Ignore null-hits (since there doesn't seem to be zero-suppression):
87  if (!(*itRDO)->getPulse1Position()&&!(*itRDO)->getPulse2Position()
88  &&!(*itRDO)->getPulse1Width()&&!(*itRDO)->getPulse2Width())
89  continue;
90 
91  int modID = moduleID((*itRDO)->getChannel());
92  it = module2data.find(modID);
93  if (it==module2data.end()) {
94  QList<const BCM_RawData*> l;
95  l << *itRDO;
96  module2data[modID] = l;
97  } else {
98  it->second << *itRDO;
99  }
100 
101  }
102  }
103 
104  for (it=module2data.begin();it!=module2data.end();++it)
105  addHandle(new VP1RawDataHandle_BCM_RDO(this,it->first,it->second));
106 
107  return true;
108 }
109 
110 //____________________________________________________________________
112 {
113  return true;
114 }
115 
116 //____________________________________________________________________
118 {
120 }
121 
122 //____________________________________________________________________
124 {
126  return;
128 
130  for (;it!=itE;++it) {
131  if (static_cast<VP1RawDataHandle_BCM_RDO*>(*it)->numberOfHighAttenuationHits()>0)
132  (*it)->update3DObjects();
133  }
134 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1RawDataHandle_BCM_RDO
Definition: VP1RawDataHandle_BCM_RDO.h:23
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
VP1RawDataColl_BCM_RDO.h
VP1RawDataCollBase::addHandle
void addHandle(VP1RawDataHandleBase *)
Definition: VP1RawDataCollBase.cxx:150
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
VP1RawDataColl_BCM_RDO::availableCollections
static QStringList availableCollections(IVP1System *)
Definition: VP1RawDataColl_BCM_RDO.cxx:27
VP1RawDataHandleBase
Definition: VP1RawDataHandleBase.h:34
VP1MaterialButton.h
VP1RawDataColl_BCM_RDO::assignDefaultMaterial
void assignDefaultMaterial(SoMaterial *) const
Definition: VP1RawDataColl_BCM_RDO.cxx:57
VP1RawDataColl_BCM_RDO::moduleID
int moduleID(int channelID) const
Definition: VP1RawDataColl_BCM_RDO.h:37
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
VP1RawDataCollBase
Definition: VP1RawDataCollBase.h:29
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1RawDataColl_BCM_RDO::useSpecialBCMHighAttMaterial
bool useSpecialBCMHighAttMaterial() const
Definition: VP1RawDataColl_BCM_RDO.cxx:117
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
VP1RawDataColl_BCM_RDO::Imp::useSpecialBCMHighAttMaterial
bool useSpecialBCMHighAttMaterial
Definition: VP1RawDataColl_BCM_RDO.cxx:35
TruthTest.itE
itE
Definition: TruthTest.py:25
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
VP1SGContentsHelper::getKeys
QStringList getKeys() const
Definition: VP1SGContentsHelper.h:55
VP1RawDataColl_BCM_RDO::~VP1RawDataColl_BCM_RDO
virtual ~VP1RawDataColl_BCM_RDO()
Definition: VP1RawDataColl_BCM_RDO.cxx:51
VP1RawDataHandle_BCM_RDO.h
IVP1System
Definition: IVP1System.h:36
VP1RawDataCollBase::getHandles
std::vector< VP1RawDataHandleBase * > & getHandles()
Definition: VP1RawDataCollBase.cxx:242
BCM_RDO_Container
Definition: BCM_RDO_Container.h:27
VP1MaterialButton::setMaterialParameters
static void setMaterialParameters(SoMaterial *m, const QColor &, const double &brightness=0.0, const double &transp=0.0)
Definition: VP1MaterialButton.cxx:802
VP1RawDataSysController.h
VP1RawDataHandle_BCM_RDO::numberOfHighAttenuationHits
int numberOfHighAttenuationHits() const
Definition: VP1RawDataHandle_BCM_RDO.h:36
VP1StdCollection::text
QString text() const
Definition: VP1StdCollection.cxx:132
VP1RawDataColl_BCM_RDO::load
bool load()
Definition: VP1RawDataColl_BCM_RDO.cxx:63
VP1RawDataCommonData.h
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1SGContentsHelper
Definition: VP1SGContentsHelper.h:26
BCM_RDO_Container.h
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
VP1JobConfigInfo::hasBCMGeometry
static bool hasBCMGeometry()
Definition: VP1JobConfigInfo.cxx:137
VP1RawDataColl_BCM_RDO::VP1RawDataColl_BCM_RDO
VP1RawDataColl_BCM_RDO(VP1RawDataCommonData *, const QString &key)
Definition: VP1RawDataColl_BCM_RDO.cxx:40
VP1RawDataCommonData
Definition: VP1RawDataCommonData.h:31
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
VP1JobConfigInfo.h
VP1SGAccessHelper
Definition: VP1SGAccessHelper.h:25
VP1RawDataColl_BCM_RDO::m_d
Imp * m_d
Definition: VP1RawDataColl_BCM_RDO.h:51
VP1RawDataColl_BCM_RDO::setUseSpecialBCMHighAttMaterial
void setUseSpecialBCMHighAttMaterial(bool)
Definition: VP1RawDataColl_BCM_RDO.cxx:123
VP1SGAccessHelper.h
VP1RawDataColl_BCM_RDO::cut
bool cut(VP1RawDataHandleBase *)
Definition: VP1RawDataColl_BCM_RDO.cxx:111
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
common
Definition: common.py:1
VP1SGContentsHelper.h
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
VP1RawDataColl_BCM_RDO::Imp
Definition: VP1RawDataColl_BCM_RDO.cxx:33