diff --git a/DataFormats/L1Scouting/BuildFile.xml b/DataFormats/L1Scouting/BuildFile.xml
index 832b36382f2f1..0f37f92979ed5 100644
--- a/DataFormats/L1Scouting/BuildFile.xml
+++ b/DataFormats/L1Scouting/BuildFile.xml
@@ -1,7 +1,5 @@
-
-
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/interface/L1ScoutingCalo.h b/DataFormats/L1Scouting/interface/L1ScoutingCalo.h
new file mode 100644
index 0000000000000..a86e3e70b8256
--- /dev/null
+++ b/DataFormats/L1Scouting/interface/L1ScoutingCalo.h
@@ -0,0 +1,149 @@
+#ifndef DataFormats_L1Scouting_L1ScoutingCalo_h
+#define DataFormats_L1Scouting_L1ScoutingCalo_h
+
+#include "DataFormats/L1Trigger/interface/EtSum.h"
+#include
+
+namespace scoutingRun3 {
+
+ class ScCaloObject {
+ public:
+ ScCaloObject()
+ : hwEt_(0),
+ hwEta_(0),
+ hwPhi_(0),
+ iso_(0){}
+
+ ScCaloObject(
+ int hwEt,
+ int hwEta,
+ int hwPhi,
+ int iso)
+ : hwEt_(hwEt),
+ hwEta_(hwEta),
+ hwPhi_(hwPhi),
+ iso_(iso) {}
+
+ ScCaloObject(const ScCaloObject& other) = default;
+ ScCaloObject(ScCaloObject&& other) = default;
+ ScCaloObject & operator=(const ScCaloObject& other) = default;
+ ScCaloObject & operator=(ScCaloObject&& other) = default;
+
+ inline void setHwEt(int hwEt) { hwEt_= hwEt;}
+ inline void setHwEta(int hwEta) { hwEta_= hwEta;}
+ inline void setHwPhi(int hwPhi) { hwPhi_= hwPhi;}
+ inline void setIso(int iso) { iso_= iso;}
+
+ inline int getHwEt() const {return hwEt_;}
+ inline int getHwEta() const {return hwEta_;}
+ inline int getHwPhi() const {return hwPhi_;}
+ inline int getIso() const {return iso_;}
+
+ inline float getEt() const {
+ return et_scale_* hwEt_;
+ }
+ inline float getEta()const {
+ return eta_scale_*hwEta_;
+ }
+ inline float getPhi() const {
+ float fPhi = phi_scale_*hwPhi_;
+ fPhi = fPhi>=2.*M_PI ? fPhi-2.*M_PI : fPhi;
+ return fPhi;
+ }
+
+ private:
+ int hwEt_;
+ int hwEta_;
+ int hwPhi_;
+ int iso_;
+
+ static constexpr float phi_scale_ = 2.*M_PI/144.;
+ static constexpr float eta_scale_ = 0.0435;
+ static constexpr float et_scale_ = 0.5;
+ };
+
+ class ScJet: public ScCaloObject {
+ public:
+ ScJet(): ScCaloObject(0, 0 ,0 , 0){}
+
+ ScJet(
+ int hwEt,
+ int hwEta,
+ int hwPhi,
+ int iso)
+ : ScCaloObject(hwEt, hwEta ,hwPhi , iso) {}
+ };
+
+ class ScEGamma: public ScCaloObject {
+ public:
+ ScEGamma(): ScCaloObject(0, 0 ,0 , 0){}
+
+ ScEGamma(
+ int hwEt,
+ int hwEta,
+ int hwPhi,
+ int iso)
+ : ScCaloObject(hwEt, hwEta ,hwPhi , iso) {}
+ };
+
+ class ScTau: public ScCaloObject {
+ public:
+ ScTau(): ScCaloObject(0, 0 ,0 , 0){}
+
+ ScTau(
+ int hwEt,
+ int hwEta,
+ int hwPhi,
+ int iso)
+ : ScCaloObject(hwEt, hwEta ,hwPhi , iso) {}
+ };
+
+
+ class ScEtSum {
+ public:
+ ScEtSum()
+ : hwEt_(0),
+ hwPhi_(0),
+ type_(l1t::EtSum::kUninitialized) {}
+
+ ScEtSum(
+ int hwEt,
+ int hwPhi,
+ l1t::EtSum::EtSumType type)
+ : hwEt_(hwEt),
+ hwPhi_(hwPhi),
+ type_(type) {}
+
+ ScEtSum(const ScEtSum& other) = default;
+ ScEtSum(ScEtSum&& other) = default;
+ ScEtSum & operator=(const ScEtSum& other) = default;
+ ScEtSum & operator=(ScEtSum&& other) = default;
+
+ inline void setHwEt(int hwEt) { hwEt_= hwEt;}
+ inline void setHwPhi(int hwPhi) { hwPhi_= hwPhi;}
+ inline void setType(l1t::EtSum::EtSumType type) { type_= type;}
+
+ inline int getHwEt() const {return hwEt_;}
+ inline int getHwPhi() const {return hwPhi_;}
+ inline l1t::EtSum::EtSumType getType() const {return type_;}
+
+ inline float getEt() const {
+ return et_scale_* hwEt_;
+ }
+ inline float getPhi() const {
+ float fPhi = phi_scale_*hwPhi_;
+ fPhi = fPhi>=2.*M_PI ? fPhi-2.*M_PI : fPhi;
+ return fPhi;
+ }
+
+ private:
+ int hwEt_;
+ int hwPhi_;
+ l1t::EtSum::EtSumType type_;
+
+ static constexpr float phi_scale_ = 2.*M_PI/144.;
+ static constexpr float et_scale_ = 0.5;
+ };
+
+} // namespace scoutingRun3
+#endif // DataFormats_L1Scouting_L1ScoutingCalo_h
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/interface/L1ScoutingMuon.h b/DataFormats/L1Scouting/interface/L1ScoutingMuon.h
index c63b3351a1d19..ac52c81224736 100644
--- a/DataFormats/L1Scouting/interface/L1ScoutingMuon.h
+++ b/DataFormats/L1Scouting/interface/L1ScoutingMuon.h
@@ -3,18 +3,120 @@
#include
-class ScMuon {
+namespace scoutingRun3 {
+ class ScMuon {
public:
- int pt, eta, phi, qual, chrg, chrgv;
- int iso, index, etae, phie, ptUncon;
- //float fpt, feta, fphi, fetae, fphie, fptUncon;
-
- inline float getPt(){return 0.05*(pt-1);}
- inline float getEta(){return 0.0870/8*eta;}
- inline float getPhi(){return 2.*M_PI/576.*phi;}
- inline float getPtUncon(){return 0.05*(ptUncon-1);}
- inline float getEtaExt(){return 0.0870/8*etae;}
- inline float getPhiExt(){return 2.*M_PI/576.*phie;}
-};
+ ScMuon()
+ : hwPt_(0),
+ hwEta_(0),
+ hwPhi_(0),
+ hwQual_(0),
+ hwChrg_(0),
+ hwChrgv_(0),
+ hwIso_(0),
+ tfIndex_(0),
+ hwEtaAtVtx_(0),
+ hwPhiAtVtx_(0),
+ hwPtUnconstrained_(0),
+ hwDXY_(0) {}
+
+ ScMuon(
+ int hwPt,
+ int hwEta,
+ int hwPhi,
+ int hwQual,
+ int hwChrg,
+ int hwChrgv,
+ int hwIso,
+ int tfIndex,
+ int hwEtaAtVtx,
+ int hwPhiAtVtx,
+ int hwPtUnconstrained,
+ int hwDXY)
+ : hwPt_(hwPt),
+ hwEta_(hwEta),
+ hwPhi_(hwPhi),
+ hwQual_(hwQual),
+ hwChrg_(hwChrg),
+ hwChrgv_(hwChrgv),
+ hwIso_(hwIso),
+ tfIndex_(tfIndex),
+ hwEtaAtVtx_(hwEtaAtVtx),
+ hwPhiAtVtx_(hwPhiAtVtx),
+ hwPtUnconstrained_(hwPtUnconstrained),
+ hwDXY_(hwDXY) {}
+
+ ScMuon(const ScMuon& other) = default;
+ ScMuon(ScMuon&& other) = default;
+ ScMuon & operator=(const ScMuon& other) = default;
+ ScMuon & operator=(ScMuon&& other) = default;
+
+ inline void setHwPt(int hwPt) { hwPt_= hwPt;}
+ inline void setHwEta(int hwEta) { hwEta_= hwEta;}
+ inline void setHwPhi(int hwPhi) { hwPhi_= hwPhi;}
+ inline void setHwQual(int hwQual) { hwQual_= hwQual;}
+ inline void setHwChrg(int hwChrg) { hwChrg_= hwChrg;}
+ inline void setHwChrgv(int hwChrgv) { hwChrgv_= hwChrgv;}
+ inline void setHwIso(int hwIso) { hwIso_= hwIso;}
+ inline void setHfIndex(int tfIndex) { tfIndex_= tfIndex;}
+ inline void setHwEtaAtVtx(int hwEtaAtVtx) { hwEtaAtVtx_= hwEtaAtVtx;}
+ inline void setHwPhiAtVtx(int hwPhiAtVtx) { hwPhiAtVtx_= hwPhiAtVtx;}
+ inline void setHwPtUnconstrained(int hwPtUnconstrained) { hwPtUnconstrained_= hwPtUnconstrained;}
+ inline void setHwDXY(int hwDXY) { hwDXY_= hwDXY;}
+
+ inline int getHwPt() const {return hwPt_;}
+ inline int getHwEta() const {return hwEta_;}
+ inline int getHwPhi() const {return hwPhi_;}
+ inline int getHwQual() const {return hwQual_;}
+ inline int getHwChrg() const {return hwChrg_;}
+ inline int getHwChrgv() const {return hwChrgv_;}
+ inline int getHwIso() const {return hwIso_;}
+ inline int getHfIndex() const {return tfIndex_;}
+ inline int getHwEtaAtVtx() const {return hwEtaAtVtx_;}
+ inline int getHwPhiAtVtx() const {return hwPhiAtVtx_;}
+ inline int getHwPtUnconstrained() const {return hwPtUnconstrained_;}
+ inline int getHwDXY() const {return hwDXY_;}
+
+ inline float getPt() const {
+ return pt_scale_*(hwPt_-1);
+ }
+ inline float getEta()const {
+ return eta_scale_*hwEta_;
+ }
+ inline float getPhi() const {
+ return phi_scale_*hwPhi_;
+ }
+ inline float getPtUnconstrained() const {
+ return pt_scale_*(hwPtUnconstrained_-1);
+ }
+ inline float getEtaAtVtx() const {
+ return eta_scale_*hwEtaAtVtx_;
+ }
+ inline float getPhiAtVtx() const {
+ return phi_scale_*hwPhiAtVtx_;
+ }
+
+ private:
+ int hwPt_;
+ int hwEta_;
+ int hwPhi_;
+ int hwQual_;
+ int hwChrg_;
+ int hwChrgv_;
+ int hwIso_;
+ int tfIndex_;
+ int hwEtaAtVtx_;
+ int hwPhiAtVtx_;
+ int hwPtUnconstrained_;
+ int hwDXY_;
+
+ // constants to convert from harware to physical quantities
+ static constexpr float pt_scale_ = 0.5;
+ static constexpr float ptunconstrained_scale_ = 1.0;
+ static constexpr float phi_scale_ = 2.*M_PI/576.;
+ static constexpr float eta_scale_ = 0.0870/8;
+ };
+
+} // namespace scoutingRun3
#endif // DataFormats_L1Scouting_L1ScoutingMuon_h
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/interface/OrbitCollection.h b/DataFormats/L1Scouting/interface/OrbitCollection.h
index 5a65859b9d887..7c19e091d895a 100644
--- a/DataFormats/L1Scouting/interface/OrbitCollection.h
+++ b/DataFormats/L1Scouting/interface/OrbitCollection.h
@@ -3,9 +3,15 @@
#include "DataFormats/Common/interface/traits.h"
#include "FWCore/Utilities/interface/GCCPrerequisite.h"
+
#include "DataFormats/L1Trigger/interface/Muon.h"
+#include "DataFormats/L1Trigger/interface/EGamma.h"
+#include "DataFormats/L1Trigger/interface/Jet.h"
+#include "DataFormats/L1Trigger/interface/Tau.h"
+#include "DataFormats/L1Trigger/interface/EtSum.h"
#include "DataFormats/L1Scouting/interface/L1ScoutingMuon.h"
+#include "DataFormats/L1Scouting/interface/L1ScoutingCalo.h"
#include
#include
@@ -20,7 +26,7 @@ namespace scoutingRun3 {
// append one object to vector at bx
void addBxObject(int bx, T& object) {
assert(bx<=3564);
- bxData_[bx].push_back(object);
+ bxData_[bx].emplace_back(object);
nObjects_ ++;
}
@@ -88,10 +94,17 @@ namespace scoutingRun3 {
int nObjects_;
};
- typedef OrbitCollection MuonOrbitCollection;
-
- typedef OrbitCollection ScMuonOrbitCollection;
-
+ typedef OrbitCollection MuonOrbitCollection;
+ typedef OrbitCollection JetOrbitCollection;
+ typedef OrbitCollection EGammaOrbitCollection;
+ typedef OrbitCollection TauOrbitCollection;
+ typedef OrbitCollection EtSumOrbitCollection;
+
+ typedef OrbitCollection ScMuonOrbitCollection;
+ typedef OrbitCollection ScJetOrbitCollection;
+ typedef OrbitCollection ScEGammaOrbitCollection;
+ typedef OrbitCollection ScTauOrbitCollection;
+ typedef OrbitCollection ScEtSumOrbitCollection;
}
#endif // DataFormats_L1Scouting_OrbitCollection_h
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/interface/SDSNumbering.h b/DataFormats/L1Scouting/interface/SDSNumbering.h
deleted file mode 100644
index 8353d423d6c64..0000000000000
--- a/DataFormats/L1Scouting/interface/SDSNumbering.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef L1Scouting_SDSNumbering_h
-#define L1Scouting_SDSNumbering_h
-
-/**
- *
- * This class holds the Scouting Data Source (SDS)
- * numbering scheme for the Level 1 scouting system
- *
- */
-
-class SDSNumbering {
- public:
- static constexpr int lastSDSId() { return MAXSDSID; }
-
- enum {
- NOT_A_SDSID = -1,
- MAXSDSID = 32,
- GmtSDSID = 1,
- CaloSDSID = 2,
- GtSDSID = 4,
- BmtfMinSDSID = 10,
- BmtfMaxSDSID = 21
- };
-};
-
-#endif // L1Scouting_SDSNumbering_h
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/interface/SDSRawDataCollection.h b/DataFormats/L1Scouting/interface/SDSRawDataCollection.h
deleted file mode 100644
index 50f958353d423..0000000000000
--- a/DataFormats/L1Scouting/interface/SDSRawDataCollection.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef L1Scouting_SDSRawDataCollection_h
-#define L1Scouting_SDSRawDataCollection_h
-
-#include "DataFormats/FEDRawData/interface/FEDRawData.h"
-#include "DataFormats/Common/interface/traits.h"
-#include "FWCore/Utilities/interface/GCCPrerequisite.h"
-
-
-/**
- *
- * This collection holds the raw data for all the
- * scouting data sources. It is a collection of FEDRawData
- *
- */
-
-class SRDCollection: public edm::DoNotRecordParents {
- public:
- SRDCollection();
-
- virtual ~SRDCollection();
-
- // retrive data for the scouting source at sourceId
- const FEDRawData& FEDData(int sourceId) const;
-
- // retrive data for the scouting source at sourceId
- FEDRawData& FEDData(int sourceId);
-
- SRDCollection(const SRDCollection&);
-
- void swap(SRDCollection& other) { data_.swap(other.data_); }
-
- private:
- std::vector data_; // vector of raw data
-};
-
-inline void swap(SRDCollection& a, SRDCollection& b) { a.swap(b); }
-
-#endif // L1Scouting_SDSRawDataCollection_h
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/src/SDSRawDataCollection.cc b/DataFormats/L1Scouting/src/SDSRawDataCollection.cc
deleted file mode 100644
index fad0039e8d499..0000000000000
--- a/DataFormats/L1Scouting/src/SDSRawDataCollection.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-#include
-#include
-
-SRDCollection::SRDCollection() : data_(SDSNumbering::lastSDSId() + 1) {}
-
-SRDCollection::SRDCollection(const SRDCollection& in) : data_(in.data_) {}
-
-SRDCollection::~SRDCollection() {}
-
-const FEDRawData& SRDCollection::FEDData(int sourceId) const { return data_[sourceId]; }
-
-FEDRawData& SRDCollection::FEDData(int sourceId) { return data_[sourceId]; }
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/src/classes.h b/DataFormats/L1Scouting/src/classes.h
index d14a7d97ff436..1d82a0428568e 100644
--- a/DataFormats/L1Scouting/src/classes.h
+++ b/DataFormats/L1Scouting/src/classes.h
@@ -1,4 +1,20 @@
-#include
-#include
+#include "DataFormats/Common/interface/RefProd.h"
+#include "DataFormats/Common/interface/Wrapper.h"
-#include
\ No newline at end of file
+#include "DataFormats/L1Scouting/interface/OrbitCollection.h"
+#include "DataFormats/L1Scouting/interface/L1ScoutingMuon.h"
+#include "DataFormats/L1Scouting/interface/L1ScoutingCalo.h"
+
+namespace scoutingRun3 {
+ edm::Wrapper> MuonOrbitCollectionWrapper;
+ edm::Wrapper> JetOrbitCollectionWrapper;
+ edm::Wrapper> EGammaOrbitCollectionWrapper;
+ edm::Wrapper> TauOrbitCollectionWrapper;
+ edm::Wrapper> EtSumOrbitCollectionWrapper;
+
+ edm::Wrapper ScMuonOrbitCollectionWrapper;
+ edm::Wrapper ScJetOrbitCollectionWrapper;
+ edm::Wrapper ScEGammaOrbitCollectionWrapper;
+ edm::Wrapper ScTauOrbitCollectionWrapper;
+ edm::Wrapper ScEtSumOrbitCollectionWrapper;
+}
\ No newline at end of file
diff --git a/DataFormats/L1Scouting/src/classes_def.xml b/DataFormats/L1Scouting/src/classes_def.xml
index b86b822479c46..41d1b23c3b5bb 100644
--- a/DataFormats/L1Scouting/src/classes_def.xml
+++ b/DataFormats/L1Scouting/src/classes_def.xml
@@ -1,5 +1,57 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DataFormats/L1ScoutingRawData/interface/SDSNumbering.h b/DataFormats/L1ScoutingRawData/interface/SDSNumbering.h
index 8353d423d6c64..e054122e79bf2 100644
--- a/DataFormats/L1ScoutingRawData/interface/SDSNumbering.h
+++ b/DataFormats/L1ScoutingRawData/interface/SDSNumbering.h
@@ -1,5 +1,5 @@
-#ifndef L1Scouting_SDSNumbering_h
-#define L1Scouting_SDSNumbering_h
+#ifndef L1ScoutingRawData_SDSNumbering_h
+#define L1ScoutingRawData_SDSNumbering_h
/**
*
@@ -23,4 +23,4 @@ class SDSNumbering {
};
};
-#endif // L1Scouting_SDSNumbering_h
\ No newline at end of file
+#endif // L1ScoutingRawData_SDSNumbering_h
\ No newline at end of file
diff --git a/DataFormats/L1ScoutingRawData/interface/SDSRawDataCollection.h b/DataFormats/L1ScoutingRawData/interface/SDSRawDataCollection.h
index 50f958353d423..8d8c8ac607052 100644
--- a/DataFormats/L1ScoutingRawData/interface/SDSRawDataCollection.h
+++ b/DataFormats/L1ScoutingRawData/interface/SDSRawDataCollection.h
@@ -1,5 +1,5 @@
-#ifndef L1Scouting_SDSRawDataCollection_h
-#define L1Scouting_SDSRawDataCollection_h
+#ifndef L1ScoutingRawData_SDSRawDataCollection_h
+#define L1ScoutingRawData_SDSRawDataCollection_h
#include "DataFormats/FEDRawData/interface/FEDRawData.h"
#include "DataFormats/Common/interface/traits.h"
@@ -35,4 +35,4 @@ class SRDCollection: public edm::DoNotRecordParents {
inline void swap(SRDCollection& a, SRDCollection& b) { a.swap(b); }
-#endif // L1Scouting_SDSRawDataCollection_h
\ No newline at end of file
+#endif // L1ScoutingRawData_SDSRawDataCollection_h
\ No newline at end of file
diff --git a/EventFilter/Utilities/test/testScoutingRun3_unpackers.py b/EventFilter/Utilities/test/testScoutingRun3_unpackers.py
new file mode 100644
index 0000000000000..61dba7d5f1a6e
--- /dev/null
+++ b/EventFilter/Utilities/test/testScoutingRun3_unpackers.py
@@ -0,0 +1,163 @@
+from __future__ import print_function
+import FWCore.ParameterSet.Config as cms
+import FWCore.ParameterSet.VarParsing as VarParsing
+import os, sys
+
+options = VarParsing.VarParsing ("analysis")
+
+options.register ("runNumber",
+ 368636,
+ VarParsing.VarParsing.multiplicity.singleton,
+ VarParsing.VarParsing.varType.int,
+ "Run Number")
+
+options.register ("daqSourceMode",
+ "ScoutingRun3",
+ VarParsing.VarParsing.multiplicity.singleton,
+ VarParsing.VarParsing.varType.string,
+ "DAQ source data mode")
+
+options.register ("buBaseDir",
+ "/dev/shm",
+ VarParsing.VarParsing.multiplicity.singleton,
+ VarParsing.VarParsing.varType.string,
+ "BU base directory")
+
+options.register ("fuBaseDir",
+ "/tmp/",
+ VarParsing.VarParsing.multiplicity.singleton,
+ VarParsing.VarParsing.varType.string,
+ "BU base directory")
+
+options.register ("fffBaseDir",
+ "/dev/shm",
+ VarParsing.VarParsing.multiplicity.singleton,
+ VarParsing.VarParsing.varType.string,
+ "FFF base directory")
+
+options.register ("numThreads",
+ 2,
+ VarParsing.VarParsing.multiplicity.singleton,
+ VarParsing.VarParsing.varType.int,
+ "Number of CMSSW threads")
+
+options.register ("numFwkStreams",
+ 2,
+ VarParsing.VarParsing.multiplicity.singleton,
+ VarParsing.VarParsing.varType.int,
+ "Number of CMSSW streams")
+
+options.parseArguments()
+
+cmsswbase = os.path.expandvars("$CMSSW_BASE/")
+
+process = cms.Process("SCPU")
+process.maxEvents = cms.untracked.PSet(
+ input = cms.untracked.int32(-1)
+)
+
+process.options = cms.untracked.PSet(
+ wantSummary = cms.untracked.bool(True),
+ numberOfThreads = cms.untracked.uint32(options.numThreads),
+ numberOfStreams = cms.untracked.uint32(options.numFwkStreams),
+ numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1)
+)
+process.MessageLogger = cms.Service("MessageLogger",
+ cout = cms.untracked.PSet(
+ threshold = cms.untracked.string( "WARNING" )
+ ),
+ destinations = cms.untracked.vstring( "cout" ),
+)
+
+process.FastMonitoringService = cms.Service("FastMonitoringService",
+ sleepTime = cms.untracked.int32(1)
+)
+
+process.Timing = cms.Service("Timing",
+ summaryOnly = cms.untracked.bool(True),
+ useJobReport = cms.untracked.bool(True)
+)
+
+process.EvFDaqDirector = cms.Service("EvFDaqDirector",
+ useFileBroker = cms.untracked.bool(False),
+ buBaseDirsAll = cms.untracked.vstring(
+ options.buBaseDir
+ ),
+ buBaseDirsNumStreams = cms.untracked.vint32(
+ 2
+ ),
+ fileBrokerHostFromCfg = cms.untracked.bool(True),
+ fileBrokerHost = cms.untracked.string("htcp40.cern.ch"),
+ runNumber = cms.untracked.uint32(options.runNumber),
+ baseDir = cms.untracked.string(options.fffBaseDir+"/"+options.fuBaseDir),
+ buBaseDir = cms.untracked.string(options.fffBaseDir+"/"+options.buBaseDir),
+ directorIsBU = cms.untracked.bool(False),
+)
+
+try:
+ os.makedirs(options.fffBaseDir+"/"+options.fuBaseDir+"/run"+str(options.runNumber).zfill(6))
+except Exception as ex:
+ print(str(ex))
+ pass
+
+ram_dir_path=options.buBaseDir+"/run"+str(options.runNumber).zfill(6)+"/"
+flist = [
+ ram_dir_path + "run" + str(options.runNumber) + "_ls0340_index000001.raw"
+]
+
+process.source = cms.Source("DAQSource",
+ testing = cms.untracked.bool(True),
+ dataMode = cms.untracked.string(options.daqSourceMode),
+ verifyChecksum = cms.untracked.bool(False),
+ useL1EventID = cms.untracked.bool(False),
+ eventChunkBlock = cms.untracked.uint32(64),
+ eventChunkSize = cms.untracked.uint32(128),
+ maxChunkSize = cms.untracked.uint32(256),
+ numBuffers = cms.untracked.uint32(2),
+ maxBufferedFiles = cms.untracked.uint32(2),
+ fileListMode = cms.untracked.bool(True),
+ fileNames = cms.untracked.vstring(*flist)
+
+)
+
+
+fuDir = options.fuBaseDir+("/run%06d" % options.runNumber)
+buDir = options.buBaseDir+("/run%06d" % options.runNumber)
+for d in fuDir, buDir, options.fuBaseDir, options.buBaseDir:
+ if not os.path.isdir(d):
+ os.makedirs(d)
+os.system("touch " + buDir + "/" + "fu.lock")
+
+process.GmtUnpacker = cms.EDProducer('ScGMTRawToDigi',
+ srcInputTag = cms.InputTag('rawDataCollector'),
+ debug=cms.untracked.bool(False)
+)
+
+process.CaloUnpacker = cms.EDProducer('ScCaloRawToDigi',
+ srcInputTag = cms.InputTag('rawDataCollector'),
+ debug=cms.untracked.bool(False)
+)
+
+process.outputZB = cms.OutputModule("PoolOutputModule",
+ fileName = cms.untracked.string('file:/dev/shm/PoolOutputTest.root'),
+ outputCommands = cms.untracked.vstring(
+ "drop *",
+ #"keep *_rawDataCollector_*_*",
+ "keep *_GmtUnpacker_*_*",
+ "keep *_CaloUnpacker_*_*"
+ ),
+ #compressionAlgorithm = cms.untracked.string("ZSTD"),
+ #compressionLevel = cms.untracked.int32(4)
+)
+
+
+
+rawToDigiTask = cms.Task(
+ process.GmtUnpacker,process.CaloUnpacker
+)
+
+process.p = cms.Path(rawToDigiTask)
+
+process.ep = cms.EndPath(
+ process.outputZB
+)
\ No newline at end of file