From af6cca5297a4791f11f0978609bb456e2b16607b Mon Sep 17 00:00:00 2001
From: Hong Ma <hong.ma@cern.ch>
Date: Mon, 23 Jun 2014 02:36:01 +0200
Subject: [PATCH] fix compiler warning (LArRecEvent-01-03-13)

---
 .../LArRecEvent/LArRecEvent/LArCell.h         | 210 ++++++++++++++++++
 .../LArRecEvent/LArCellCollection.h           |  82 +++++++
 .../LArRecEvent/LArCellContainer.h            |  75 +++++++
 .../LArRecEvent/LArCollisionTime.h            |  67 ++++++
 .../LArRecEvent/LArRecEvent/LArEventBitInfo.h |  12 +
 .../LArRecEvent/LArRecEvent/LArFebEnergy.h    |  89 ++++++++
 .../LArRecEvent/LArFebEnergyCollection.h      |  41 ++++
 .../LArRecEvent/LArNoisyROSummary.h           | 108 +++++++++
 .../LArRecEvent/LArRecEvent/LArRecEventDict.h |   7 +
 .../LArRecEvent/LArRecEvent/selection.xml     |   5 +
 LArCalorimeter/LArRecEvent/cmt/requirements   |  33 +++
 LArCalorimeter/LArRecEvent/doc/mainpage.h     |  28 +++
 LArCalorimeter/LArRecEvent/src/LArCell.cxx    |  49 ++++
 .../LArRecEvent/src/LArCellCollection.cxx     |  37 +++
 .../LArRecEvent/src/LArCellContainer.cxx      |  34 +++
 .../LArRecEvent/src/LArNoisyROSummary.cxx     |  78 +++++++
 16 files changed, 955 insertions(+)
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/LArCell.h
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/LArCellCollection.h
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/LArCellContainer.h
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/LArCollisionTime.h
 create mode 100644 LArCalorimeter/LArRecEvent/LArRecEvent/LArEventBitInfo.h
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergy.h
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergyCollection.h
 create mode 100644 LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/LArRecEventDict.h
 create mode 100755 LArCalorimeter/LArRecEvent/LArRecEvent/selection.xml
 create mode 100755 LArCalorimeter/LArRecEvent/cmt/requirements
 create mode 100755 LArCalorimeter/LArRecEvent/doc/mainpage.h
 create mode 100755 LArCalorimeter/LArRecEvent/src/LArCell.cxx
 create mode 100755 LArCalorimeter/LArRecEvent/src/LArCellCollection.cxx
 create mode 100755 LArCalorimeter/LArRecEvent/src/LArCellContainer.cxx
 create mode 100644 LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx

diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArCell.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCell.h
new file mode 100755
index 00000000000..c0142cd8d39
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCell.h
@@ -0,0 +1,210 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRECEVENT_LARCELL_H
+#define LARRECEVENT_LARCELL_H
+
+/**
+   @class LArCell
+   @brief Data object for LAr calorimeter readout cell
+
+   LArCell does not add any information to its parent CaloCell. It is  
+   kept mainly for historical reasons, but also if it turns out to be  
+   necessary to add data members pertaining only to LArCell and not to  TileCell. 
+
+   @author Hong Ma
+   @author Srini Rajagopalan
+
+*/
+
+/*
+CREATED:  Dec. 15, 1999
+
+Updated: May 10, 2000    (SR, HM)
+         Migrated to Athena Framework from PASO
+
+Updated: Nov. 03, 2000   (HM)
+         Follow new LArCell Contructor (include time, quality)
+
+Updated: Dec. 02, 2000    (M. Wielers, P. Loch)
+         Extended to work for FCAL
+
+Updated: Jan. 2, 2001    (SR)
+         Adhere to QC standards (based on comments from S. Albrand)
+
+Updated: Jan. 2, 2001    (Efrank)
+         Add Navigation code.
+
+Updated:  April 2002  (H. Ma) 
+	moved to LArCalorimeter/LArRecEvent 
+
+Updated:  June 2003  (H. Ma) 
+	moved to CaloCell with CaloDDE* 
+
+********************************************************************/
+
+
+#include "CaloEvent/CaloCell.h"
+#include "CaloIdentifier/CaloGain.h"
+
+class LArCell: public CaloCell
+// Note: this class also inherits from Navigable, via CaloCell
+{
+
+public:
+
+  
+  /** @brief default constructor (should not be used, only there for persistency reason) */    
+  LArCell();
+  
+  /** @brief Legacy constructor */
+  LArCell(const CaloDetDescrElement* caloDDE, 
+	  double energy,
+	  double time,
+	  double quality,
+	  CaloGain::CaloGain gain);
+
+  /** @brief Main constructor */
+  LArCell(const CaloDetDescrElement* caloDDE, 
+          double energy, 
+          double time,
+          uint16_t quality,
+          uint16_t provenance,
+          CaloGain::CaloGain gain);
+
+  
+  /** @brief  Legacy constructor with ID */
+  LArCell(const CaloDetDescrElement* caloDDE, 
+	  const Identifier& id,
+	  double energy,
+	  double time,
+	  double quality,
+	  CaloGain::CaloGain gain);
+
+  /** @brief   constructor with ID */
+  LArCell(const CaloDetDescrElement* caloDDE, 
+          const Identifier& id,
+          double energy, 
+          double time,
+          uint16_t quality,
+          uint16_t provenance,
+          CaloGain::CaloGain gain);
+
+  
+  /** @brief default destructor */
+  virtual ~LArCell ();
+  
+  /** @brief get deltaR (using 4mom helper) with respect to another cell */
+  double deltaR	(const LArCell* other) const ; 
+  
+  /** @brief print all relevant info about this cell */
+  void   print	(void) const; 
+
+  /** @brief clone this cell into another one*/
+  virtual CaloCell* clone() const;
+  
+  /** @brief Add energy to this cell. 
+      This is typically used in case of duplicate cells 
+      where only one LArCell Object is created and 	
+      all duplicate cells are summed. */	 
+  void add_energy     (double energy);
+
+  /** @brief set Energy to this cell with inline method. 
+      This is requested by HLT to build LArCell fast.
+  */	 
+  void setEnergyFast(float e) ; 
+
+  /** @brief set Quality to this cell with inline method. 
+      This is requested by HLT to build LArCell fast.
+  */	 
+  void setQualityFast(float q) ; 
+
+  /** @brief set Time to this cell with inline method. 
+      This is requested by HLT to build LArCell fast.
+  */	 
+  void setTimeFast(float t) ; 
+
+  /** @brief  Check from provenance bit is cell is dead */
+  virtual bool badcell() const;
+
+
+
+private:
+
+};
+
+
+// inline methods:
+
+inline LArCell::LArCell() : CaloCell()
+{}
+
+inline LArCell::LArCell(const CaloDetDescrElement* caloDDE, 
+			double energy,
+			double time,
+			double quality,
+			CaloGain::CaloGain gain)
+    :
+    CaloCell(caloDDE,energy,time,quality,gain)
+{}
+
+inline LArCell::LArCell(const CaloDetDescrElement* caloDDE, 
+			const Identifier& id, 
+			double energy,
+			double time,
+			double quality,
+			CaloGain::CaloGain gain)
+    :
+    CaloCell(caloDDE,id,energy,time,quality,gain)
+{}
+
+inline LArCell::LArCell(const CaloDetDescrElement* caloDDE, 
+                        double energy, 
+                        double time,
+                        uint16_t quality,
+                        uint16_t provenance,
+                        CaloGain::CaloGain gain)
+    :
+    CaloCell(caloDDE,energy,time,quality,provenance,gain)
+{}
+
+inline LArCell::LArCell(const CaloDetDescrElement* caloDDE, 
+                        const Identifier& id, 
+                        double energy, 
+                        double time,
+                        uint16_t quality,
+                        uint16_t provenance,
+                        CaloGain::CaloGain gain)
+    :
+    CaloCell(caloDDE,id,energy,time,quality,provenance,gain)
+{}
+
+
+
+inline void LArCell::add_energy(double energy) 	 
+{ 	 
+m_energy += energy; 	 
+}
+
+
+inline void LArCell::setEnergyFast(float e) 	 
+{ 	 
+  m_energy = e ;  
+}
+
+
+inline void LArCell::setQualityFast(float q) 	 
+{ 	 
+  m_quality = (int)(q) ;  
+}
+
+
+inline void LArCell::setTimeFast(float t) 	 
+{ 	 
+  m_time = t ;  
+}
+
+#endif
+
+
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArCellCollection.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCellCollection.h
new file mode 100755
index 00000000000..755bd545a48
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCellCollection.h
@@ -0,0 +1,82 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LArCellCollection_H
+#define LArCellCollection_H
+
+#include "Identifier/HWIdentifier.h"
+#include "LArRecEvent/LArCell.h"
+#include "DataModel/DataVector.h" 
+#include "CLIDSvc/CLASS_DEF.h"
+
+#include "Identifier/IdentifierHash.h" 
+#include "LArRecEvent/LArFebEnergy.h" 
+
+#include <map>
+#include <vector>
+
+/** 
+    @class LArCellCollection
+    @brief Container Class for LArCell in a ROB used by EF 
+
+    It is meant to store LArCell in Store Gate
+
+    @author Hong Ma
+ */
+
+class LArCellCollection : public DataVector<LArCell> {
+
+ public:
+
+  /** @brief required for a Digit Collection */
+  typedef HWIdentifier  ID; 
+  typedef unsigned int TT_ID; 
+  typedef LArCell OBJECT ; 
+
+  /** @brief construct a container for a given Front End Board */
+  LArCellCollection ( const ID& id ) :
+	DataVector<LArCell>(SG::VIEW_ELEMENTS), m_id(id) { };
+
+  /** @brief destructor */
+  virtual ~LArCellCollection() 
+  { 
+  };
+
+  /** @brief return identity of the FEB corresponding to this container */
+  ID  identify() const { return m_id;} 
+
+  /** @brief set the TriggerTower */
+  void setTT(const TT_ID& id, 
+		    const_iterator b, const_iterator e); 
+
+  /** @brief get the TriggerTower */
+  void getTT(const TT_ID& id, const_iterator& b,
+	       const_iterator& e) const ; 
+
+  /** @brief set the feb energy */
+  void addfebenergy(LArFebEnergy& larfebenergy){
+            m_febE.push_back(larfebenergy);
+  }
+
+ private: 
+
+  /** @brief internal map for TTs */ 
+  ID  m_id;
+
+  /** @brief iterator pair for begin and end */
+  typedef std::pair<const_iterator,const_iterator> ITPAIR; 
+  /** @brief ID to Iterator Map */
+  typedef std::map<TT_ID,ITPAIR> ID_IT_MAP; 
+
+  /** @brief vector of FEB energies */ 
+  std::vector<LArFebEnergy> m_febE;
+
+  /** @brief ID to Iterator Map */ 
+  ID_IT_MAP  m_Map; 
+};
+
+CLASS_DEF(LArCellCollection,2724,0) 
+
+#endif
+
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArCellContainer.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCellContainer.h
new file mode 100755
index 00000000000..555fa9acf88
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCellContainer.h
@@ -0,0 +1,75 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRECEVENT_LARCELLCONTAINER_H
+#define LARRECEVENT_LARCELLCONTAINER_H
+
+
+/** 
+    @class LArCellContainer
+    @brief Container Class for LArCell (obsolete)
+
+    This is a data object, containing a collection of 
+    CaloCell Objects.  Note that LArCell inherits from CaloCell
+    and LArCellContainer inherits from CaloCellContainer.
+    While retrieving the collection from the TDS - the
+    default iterator while iterating over this collection is
+    therefore CaloCell. Derived iterators are provided to
+    return the pointer to LArCell is necessary.
+
+
+    @author Hong Ma
+    @author Srini Rajagopalan
+*/
+
+/*
+CREATED:  Dec. 15, 1999
+
+Updated: May 10, 2000    (SR, HM)
+         Migrated to Athena Framework from PASO
+
+Updated: Nov. 03, 2000   (HM)
+         Follow new LArCell Contructor (include time, quality)
+
+Updated: Dec. 02, 2000    (M. Wielers, P. Loch)
+         Extended to work for FCAL
+
+Updated: Jan. 2, 2001    (SR)
+         Adhere to QC standards (based on comments from S. Albrand)
+
+Update:  May 10, 2001 (HMA) 
+	 add CLID 
+	 convert to GaudiKernel
+	 
+Updated: April 11, 2002 (HMA) 
+	Moved to LArCalorimeter/LArRecEvent 
+
+Updated: June 24, 2003 (DR) 
+        Add optional Ownership switch in constructor for use with DataPool 
+********************************************************************/
+
+#include "DataModel/DataVector.h" 
+#include "CLIDSvc/CLASS_DEF.h"
+#include "LArRecEvent/LArCell.h"
+
+class LArCellContainer : public DataVector<LArCell>
+{
+
+ public:
+
+  /** @brief Main constructor */
+  LArCellContainer(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS) : DataVector<LArCell>(ownPolicy){ };
+
+  /**  @brief destructor */  
+  virtual ~LArCellContainer() { };
+
+  /** @brief dump  */
+  void print();
+  
+};
+
+CLASS_DEF(LArCellContainer, 2731, 1)
+
+#endif
+
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArCollisionTime.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCollisionTime.h
new file mode 100755
index 00000000000..938c62c63b6
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArCollisionTime.h
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LArCollisionTime_H
+#define LArCollisionTime_H
+
+/**
+   @class LArCollisionTime
+   @brief Holds information about collisions timing from end-cap LAr calorimeters
+
+   @author G.Unal
+   
+*/
+
+#include "CLIDSvc/CLASS_DEF.h"
+
+class LArCollisionTime 
+{
+  
+ public:
+  
+  /** @brief main constructor with all data members set to zero */
+  LArCollisionTime();
+    
+  /** @brief constructor; initialize all data members in constructor */
+  LArCollisionTime( int ncellA, int ncellC, float energyA, float energyC, float timeA, float timeC);
+
+  /** @brief get number of cells for time A side */
+  int ncellA() const{ return m_ncellA; }
+
+  /** @brief get number of cells for time C side */
+  int ncellC() const{ return m_ncellC; };
+
+  /** @brief total energy A side */
+  double energyA() const{ return m_energyA; };
+  
+  /** @brief total energy C side */
+  double energyC() const{ return m_energyC; };
+  
+  /** @brief time A side */
+  double timeA() const{ return m_timeA; };
+  
+  /** @brief time C side */
+  double timeC() const{ return m_timeC; };
+  
+ private:
+
+  int m_ncellA;
+  int m_ncellC;
+  float m_energyA;
+  float m_energyC;
+  float m_timeA;
+  float m_timeC;
+
+};
+
+CLASS_DEF(LArCollisionTime,79775856,0)
+
+inline LArCollisionTime::LArCollisionTime()
+  : m_ncellA(0), m_ncellC(0), m_energyA(0.), m_energyC(0.), m_timeA(0.), m_timeC(0.) {} 
+
+inline LArCollisionTime::LArCollisionTime( int ncellA, int ncellC, float energyA, float energyC, float timeA, float timeC)
+  : m_ncellA(ncellA), m_ncellC(ncellC), m_energyA(energyA), m_energyC(energyC), m_timeA(timeA), m_timeC(timeC){}
+
+
+#endif //LArCollisionTime_H
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArEventBitInfo.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArEventBitInfo.h
new file mode 100644
index 00000000000..db73aab82b5
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArEventBitInfo.h
@@ -0,0 +1,12 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRECEVENT_LAREVENTBITINFO_H
+#define LARRECEVENT_LAREVENTBITINFO_H
+
+namespace LArEventBitInfo {
+  enum   LARFLAGREASON {BADFEBS=0, MEDIUMSATURATEDQ=1, TIGHTSATURATEDQ=2, NOISEBURSTVETO=3, DATACORRUPTED=4, DATACORRUPTEDVETO=5, BADFEBS_W=6};
+}
+
+#endif
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergy.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergy.h
new file mode 100755
index 00000000000..1ba535eca46
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergy.h
@@ -0,0 +1,89 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARFEBENERGY_H
+#define LARFEBENERGY_H
+
+/**
+   @class LArFebEnergy
+   @brief Holds partial energy sums Ex,Ey,Ez for each Feb
+
+   The LArFebEnergy is a simple base class which holds the partial energy sums Ex, 
+   Ey, Ez which are calculated for each FEB. The data members can be set and 
+   accessed through public methods.
+   
+   @author Ignacio Aracena
+   
+*/
+
+class LArFebEnergy 
+{
+  
+ public:
+  
+  /** @brief main constructor with all data members set to zero */
+  LArFebEnergy();
+    
+  /** @brief constructor; initialize all data members in constructor */
+  LArFebEnergy( unsigned int febid, double ex, double ey, double ez, double sume );      
+
+  /** @brief constructor for a given FebId */
+  LArFebEnergy( unsigned int febid );
+  
+  /** @brief get FebId (data member) */
+  unsigned int getFebId() const{ return m_febId; }
+
+  /** @brief get FebEx (data member) */
+  double getFebEx() const{ return m_ex; }
+
+  /** @brief get FebEy (data member) */
+  double getFebEy() const{ return m_ey; }
+
+  /** @brief get FebEz (data member) */
+  double getFebEz() const{ return m_ez; }
+  
+  /** @brief get FebSumE (data member) */
+  double getFebSumE() const{ return m_sumE; }
+  
+  /** @brief set FebEx (data member) */
+  void setFebEx( const double enex ) { m_ex = enex; }
+
+  /** @brief set FebEy (data member) */
+  void setFebEy( const double eney ) { m_ey = eney; }
+
+  /** @brief set FebEz (data member) */
+  void setFebEz( const double enez ) { m_ez = enez; }
+
+  /** @brief set FebSumE (data member) */
+  void setFebSumE( const double sume ) { m_sumE = sume; }
+
+ private:
+
+  /** @brief Feb identifier */
+  unsigned int m_febId;
+
+  /** @brief Feb Ex */
+  double m_ex;
+
+  /** @brief Feb Ey */
+  double m_ey;
+
+  /** @brief Feb Ez */
+  double m_ez;
+
+  /** @brief Feb SumE */
+  double m_sumE;
+
+};
+
+inline LArFebEnergy::LArFebEnergy()
+  : m_febId(0) , m_ex(0.) , m_ey(0.), m_ez(0.), m_sumE(0.){} 
+
+inline LArFebEnergy::LArFebEnergy( unsigned int febid, double ex, double ey, double ez, double sume ) 
+  : m_febId(febid), m_ex(ex), m_ey(ey), m_ez(ez), m_sumE(sume){}
+
+inline LArFebEnergy::LArFebEnergy( unsigned int febid ) 
+  : m_febId(febid){}
+
+#endif //LARFEBENERGY_H
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergyCollection.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergyCollection.h
new file mode 100755
index 00000000000..88995cf0ca7
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArFebEnergyCollection.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARFEBENERGYCOLLECTION_H
+#define LARFEBENERGYCOLLECTION_H
+
+/**
+   @class LArFebEnergyCollection
+   @brief Container class for LArFebEnergy
+
+   @author Ignacio Aracena
+   
+*/
+
+
+#include "LArRecEvent/LArFebEnergy.h"
+#include "DataModel/DataVector.h"
+#include "CLIDSvc/CLASS_DEF.h"
+
+#include "LArRecEvent/LArFebEnergy.h"
+
+
+class LArFebEnergyCollection : public DataVector<LArFebEnergy> {
+
+ public:
+  
+  /** @brief constructor*/
+  LArFebEnergyCollection () 
+    {
+    };
+  
+  /** @brief destructor */
+  virtual ~LArFebEnergyCollection()
+    {
+    };
+  
+};
+
+CLASS_DEF( LArFebEnergyCollection , 1315019678 , 1 )
+#endif
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h
new file mode 100644
index 00000000000..17194b9d62c
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArNoisyROSummary.h
@@ -0,0 +1,108 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LArNoisyROSummary_h
+#define LArNoisyROSummary_h
+
+#include "Identifier/HWIdentifier.h"
+#include "CLIDSvc/CLASS_DEF.h"
+
+#include <vector>
+#include <stdint.h>
+
+
+/** 
+@class LArNoisyROSummary
+@brief Summary information for noisy LAr preamp / FEBs
+
+@author Laurent Duflot
+
+- May 2014 : modified b B.Trocmé to include a weighted bad FEBs flag 
+(see LArCellRec/LArNoisyROAlg for more details) 
+*/
+
+class LArNoisyROSummary
+{
+ public:
+  // bit masks to set bitpattern according to which partition flagged the event
+  enum PartitionMask {FCALAMask=0x1, FCALCMask=0x2, 
+		      HECAMask=0x4, HECCMask=0x8,
+		      EMECAMask=0x10, EMECCMask=0x20, 
+		      EMBAMask=0x40, EMBCMask=0x80};
+
+  //* Constructor */
+  LArNoisyROSummary();
+
+  ~LArNoisyROSummary();
+
+  //** clear internal data (useful for ARA that does not unpack to a new object every time) */
+  void clear();
+
+
+  //** Set the list of noisy FEBs via the FEB HWIdentifiers */
+  void set_noisy_febs(const std::vector<HWIdentifier>& );
+
+  //** add a FEB to the bad FEB list */
+  void add_noisy_feb(HWIdentifier febid);
+
+
+  //** Set the list of noisy preamps: for each FEB identifier via HWIdentifier keep the noisy preamps as the first channel number for that preamp */
+  void set_noisy_preamps(const std::vector< std::pair<HWIdentifier, std::vector<int> > >&);
+
+  //** add noisy preamp as FEB id + first channel for preamp */
+  void add_noisy_preamp(HWIdentifier febid, int channel);
+
+
+  //** set Partition bit pattern for bad FEB flagging **//
+  void SetBadFEBFlaggedPartitions(uint8_t bitpattern) { m_BadFEBFlaggedPartitions = bitpattern;}
+
+  //** set Partition bit pattern for bad FEB flagging - Weighetd computation**//
+  void SetBadFEB_WFlaggedPartitions(uint8_t bitpattern) { m_BadFEB_WFlaggedPartitions = bitpattern;}
+
+  //** set Partition bit pattern for saturated cells medium criteria flagging **//
+  void SetSatMediumFlaggedPartitions(uint8_t bitpattern) { m_SatMediumFlaggedPartitions = bitpattern;}
+
+  //** set Partition bit pattern for saturated cells tight criteria flagging **//
+  void SetSatTightFlaggedPartitions(uint8_t bitpattern) { m_SatTightFlaggedPartitions = bitpattern;}
+
+
+  //** retrieve noisy FEBs by id */
+  const std::vector<HWIdentifier>& get_noisy_febs() const;
+
+  //** retrieve noisy preamplifiers */
+  const std::vector<std::pair<HWIdentifier, std::vector<int> > >& get_noisy_preamps() const;
+
+  //** Partition bit map for bad FEB flagging **//
+  uint8_t BadFEBFlaggedPartitions() const {return m_BadFEBFlaggedPartitions;}
+
+  //** Partition bit map for bad FEB flagging - Weighted computation**//
+  uint8_t BadFEB_WFlaggedPartitions() const {return m_BadFEB_WFlaggedPartitions;}
+
+  //** Partition bit map for saturated cells medium criteria flagging **//
+  uint8_t SatMediumFlaggedPartitions() const {return m_SatMediumFlaggedPartitions;}
+
+  //** Partition bit map for saturated cells tight criteria flagging **//
+  uint8_t SatTightFlaggedPartitions() const {return m_SatTightFlaggedPartitions;}
+
+ private:
+
+  //** List of noisy FEBs */
+  std::vector<HWIdentifier> m_noisy_febs;
+
+
+  //** List of noisy preamps, for each FEB identifier via HWIdentifier keep the noisy preamps as the first channel number for that preamp */
+  std::vector< std::pair<HWIdentifier, std::vector<int> > > m_noisy_preamps;
+
+  uint8_t m_BadFEBFlaggedPartitions;
+  uint8_t m_BadFEB_WFlaggedPartitions;
+  uint8_t m_SatMediumFlaggedPartitions;
+  uint8_t m_SatTightFlaggedPartitions;
+
+};
+
+
+CLASS_DEF( LArNoisyROSummary , 112588521 , 2 )
+
+
+#endif
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/LArRecEventDict.h b/LArCalorimeter/LArRecEvent/LArRecEvent/LArRecEventDict.h
new file mode 100755
index 00000000000..2fa21ecae76
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/LArRecEventDict.h
@@ -0,0 +1,7 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRecEvent/LArCell.h"
+#include "LArRecEvent/LArNoisyROSummary.h"
+#include "LArRecEvent/LArCollisionTime.h"
diff --git a/LArCalorimeter/LArRecEvent/LArRecEvent/selection.xml b/LArCalorimeter/LArRecEvent/LArRecEvent/selection.xml
new file mode 100755
index 00000000000..6b8f41415f8
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/LArRecEvent/selection.xml
@@ -0,0 +1,5 @@
+<lcgdict>
+  <class name="LArCell" /> 
+  <class name="LArNoisyROSummary" /> 
+  <class name="LArCollisionTime" />
+</lcgdict>
diff --git a/LArCalorimeter/LArRecEvent/cmt/requirements b/LArCalorimeter/LArRecEvent/cmt/requirements
new file mode 100755
index 00000000000..f9e3e9eddb8
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/cmt/requirements
@@ -0,0 +1,33 @@
+package LArRecEvent
+
+author RD Schaffer <R.D.Schaffer@cern.ch>
+author Srini Rajagopalan <srini@sun2.bnl.gov>
+author Hong Ma <hma@bnl.gov>
+
+use AtlasPolicy     AtlasPolicy-*     
+use DataModel       DataModel-*         Control
+use CaloEvent       CaloEvent-*         Calorimeter
+use Identifier	    Identifier-*	DetectorDescription
+#use LArIdentifier   LArIdentifier-*	LArCalorimeter
+use CLIDSvc	    CLIDSvc-*	        Control
+use CaloIdentifier  CaloIdentifier-*	Calorimeter
+
+private
+use FourMomUtils    FourMomUtils-*	Event
+end_private
+
+library LArRecEvent *.cxx
+apply_pattern installed_library 
+
+private 
+use AtlasReflex   AtlasReflex-*   External -no_auto_imports
+
+# Pattern to build the dict lib. User should create a single header
+# file: <package>Dict.h which includes all other .h files. See MissingETDict
+# A selection file must be created by hand. This file lists the
+# classes to be added to the dictionary, and which fields are
+# transient. It should be put in ../<package> dir and is conventionally called
+# selection.xml.
+apply_pattern lcgdict dict=LArRecEvent \
+selectionfile=selection.xml \
+headerfiles="../LArRecEvent/LArRecEventDict.h" 
diff --git a/LArCalorimeter/LArRecEvent/doc/mainpage.h b/LArCalorimeter/LArRecEvent/doc/mainpage.h
new file mode 100755
index 00000000000..02508dffa1c
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/doc/mainpage.h
@@ -0,0 +1,28 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+
+@mainpage LArRecEvent Package
+
+This package contains reconstruction data classes specific for LAr 
+
+@author Hong Ma <hma@bnl.gov>
+
+@section LArCell LArCell 
+  
+LArCell is a derived class that extends CaloCell for LAr readout cells.
+
+LArCellContainer : obsolete class.  LArCells are stored in CaloCellContainer.
+
+LArCellIDC :  IdentifiableContainer for LArCell. Only used in Event Filter
+
+@section LArFebEnergy LArFebEnergy
+
+LArFebEnergy holds the sum of Ex, Ey and Ez for each FEB, which can be prepared in ROD.
+
+LArFebEnergyCollection is a container class for LArFebEnergy
+
+
+*/
diff --git a/LArCalorimeter/LArRecEvent/src/LArCell.cxx b/LArCalorimeter/LArRecEvent/src/LArCell.cxx
new file mode 100755
index 00000000000..eedaf8ae02d
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/src/LArCell.cxx
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "LArRecEvent/LArCell.h"
+#include "CaloIdentifier/LArEM_ID.h"
+#include "FourMomUtils/P4Helpers.h"
+
+#include <iostream>
+
+
+LArCell::~LArCell () 
+{  }
+
+
+double LArCell::deltaR(const LArCell* other) const
+{
+  
+  return P4Helpers::deltaR(this,other);
+  
+}
+
+
+void LArCell::print() const
+{
+  std::cout << "ID         = " << this->ID().get_compact()<< std::endl;
+  std::cout << "Energy     = " << this->e()<< std::endl;
+  std::cout << "Eta        = " << this->eta() << std::endl;
+  std::cout << "Phi        = " << this->phi() << std::endl;
+}
+
+CaloCell* LArCell::clone() const
+{
+  return new LArCell(this->caloDDE(),
+		     this->ID(),
+		     this->energy(),
+		     this->time(),
+		     this->quality(),
+                     this->provenance(),
+		     this->gain()); 
+}
+
+
+bool LArCell::badcell() const
+{
+  if (this->provenance() & 0x0800) return true;
+  return false;
+}
diff --git a/LArCalorimeter/LArRecEvent/src/LArCellCollection.cxx b/LArCalorimeter/LArRecEvent/src/LArCellCollection.cxx
new file mode 100755
index 00000000000..cfec3cac333
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/src/LArCellCollection.cxx
@@ -0,0 +1,37 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// implementation of LArRawChannelCollection 
+
+#include "LArRecEvent/LArCellCollection.h"
+#include "LArRecEvent/LArCell.h"
+
+// 
+void LArCellCollection::setTT(const TT_ID& id, 
+		    const_iterator b, const_iterator e)
+{
+  m_Map[id] = ITPAIR(b,e); 
+  return ; 
+
+}
+
+void LArCellCollection::getTT(const TT_ID& id, 
+	const_iterator& b,  const_iterator& e) const 
+{
+
+   ID_IT_MAP::const_iterator itPair = m_Map.find(id); 
+   if(itPair!=m_Map.end()){
+	// get the begin and end iterator 
+	b = (*itPair).second.first; 
+	e = (*itPair).second.second; 
+	return; 
+   }
+
+// can't find it, return end() ; 
+
+   b = end(); 
+   e = end(); 
+
+   return ; 
+}
diff --git a/LArCalorimeter/LArRecEvent/src/LArCellContainer.cxx b/LArCalorimeter/LArRecEvent/src/LArCellContainer.cxx
new file mode 100755
index 00000000000..98e0c206194
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/src/LArCellContainer.cxx
@@ -0,0 +1,34 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRecEvent/LArCellContainer.h"
+#include "LArRecEvent/LArCell.h"
+
+#include <iostream>
+void LArCellContainer::print()
+{ 
+
+  LArCellContainer::iterator c_itr; 
+  float etotal = 0; 
+
+  for (c_itr=begin(); c_itr!=end(); c_itr++) 
+  {
+    (*c_itr)->print();
+    etotal+=(*c_itr)->energy(); 
+  }
+
+  // FIXME:  SHould not use a cout, but cannot use Athena logging services
+
+  std::cout << "Number of cells found " << this->size() 
+	    << " - Total energy =" << etotal
+	    << std::endl;
+
+}
+
+
+
+
+
+
+
diff --git a/LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx b/LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx
new file mode 100644
index 00000000000..00e17fe58f3
--- /dev/null
+++ b/LArCalorimeter/LArRecEvent/src/LArNoisyROSummary.cxx
@@ -0,0 +1,78 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRecEvent/LArNoisyROSummary.h"
+
+
+LArNoisyROSummary::LArNoisyROSummary():
+  m_BadFEBFlaggedPartitions(0), 
+  m_BadFEB_WFlaggedPartitions(0),
+  m_SatMediumFlaggedPartitions(0), 
+  m_SatTightFlaggedPartitions(0)
+{
+}
+
+LArNoisyROSummary::~LArNoisyROSummary()
+{
+}
+
+void LArNoisyROSummary::clear()
+{
+  m_noisy_febs.clear();
+  m_noisy_preamps.clear();
+  m_BadFEBFlaggedPartitions = 0; 
+  m_BadFEB_WFlaggedPartitions = 0;
+  m_SatMediumFlaggedPartitions = 0;
+  m_SatTightFlaggedPartitions = 0;
+}
+
+
+void LArNoisyROSummary::set_noisy_febs(const std::vector<HWIdentifier>& badfebs)
+{
+  m_noisy_febs = badfebs;
+}
+
+
+void LArNoisyROSummary::add_noisy_feb(HWIdentifier febid)
+{
+  m_noisy_febs.push_back(febid);
+}
+
+void LArNoisyROSummary::set_noisy_preamps(const std::vector< std::pair<HWIdentifier, std::vector<int> > >& badPAs)
+{
+  m_noisy_preamps = badPAs;
+}
+
+void LArNoisyROSummary::add_noisy_preamp(HWIdentifier febid, int channel)
+{
+  // search the vector for the corresponding FEB id NB: the vector should be short
+  // so this should not be slow
+  bool found = false;
+  for (size_t i=0; i<m_noisy_preamps.size(); i++)
+  {
+    if ( m_noisy_preamps[i].first == febid )
+    {
+      found = true;
+      m_noisy_preamps[i].second.push_back(channel);
+    }
+  }
+  if ( ! found )  // create entry for that FEB
+  {
+    std::vector<int> PAnbs;
+    PAnbs.push_back(channel);
+
+    m_noisy_preamps.push_back(std::make_pair(febid,PAnbs));
+  }
+}
+
+
+const std::vector<HWIdentifier>& LArNoisyROSummary::get_noisy_febs() const
+{
+  return m_noisy_febs;
+}
+
+const std::vector<std::pair<HWIdentifier,std::vector<int> > >& LArNoisyROSummary::get_noisy_preamps() const
+{
+  return m_noisy_preamps;
+}
-- 
GitLab