Skip to content

Commit

Permalink
* State that we are using the TFileService
Browse files Browse the repository at this point in the history
  • Loading branch information
ianna committed Nov 18, 2015
1 parent 74c2d89 commit ee0db90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
2 changes: 2 additions & 0 deletions Geometry/CSCGeometry/test/stubs/CSCLayerGeometryInside.cc
Expand Up @@ -68,6 +68,8 @@ CSCLayerGeometryInside::CSCLayerGeometryInside( const edm::ParameterSet& ps )
xlo( ps.getUntrackedParameter<double>("xlo") ), xhi( ps.getUntrackedParameter<double>("xhi") ),
ylo( ps.getUntrackedParameter<double>("ylo") ), yhi( ps.getUntrackedParameter<double>("yhi") )
{
usesResource("TFileService");

std::cout << myName_ << " constructor:" << std::endl;
std::cout << "x range is " << nbx << " bins from " << xlo << " to " << xhi << std::endl;
std::cout << "y range is " << nby << " bins from " << ylo << " to " << yhi << std::endl;
Expand Down
2 changes: 2 additions & 0 deletions Geometry/CaloEventSetup/test/CaloGeometryAnalyzer.cc
Expand Up @@ -117,6 +117,8 @@ class CaloGeometryAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResourc

CaloGeometryAnalyzer::CaloGeometryAnalyzer( const edm::ParameterSet& /*iConfig*/ )
{
usesResource("TFileService");

pass_=0;

h_dPhi[0] = h_fs->make<TProfile>("dPhi:EB:index", "EB: dPhi vs index", 61200, -0.5, 61199.5, " " ) ;
Expand Down
28 changes: 3 additions & 25 deletions Geometry/EcalTestBeam/test/ee/SurveyToTransforms.cc
Expand Up @@ -27,15 +27,13 @@ using namespace CLHEP;
class SurveyToTransforms : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
SurveyToTransforms( const edm::ParameterSet& );
~SurveyToTransforms();
~SurveyToTransforms() {}

void beginJob() override {}
void analyze(edm::Event const&, edm::EventSetup const&) override;
void endJob() override {}

private:
int pass_;

edm::Service<TFileService> h_fs;

TProfile* h_eta;
Expand All @@ -46,9 +44,8 @@ class SurveyToTransforms : public edm::one::EDAnalyzer<edm::one::SharedResources

SurveyToTransforms::SurveyToTransforms( const edm::ParameterSet& iConfig )
{
//now do what ever initialization is needed
pass_=0;
// fullEcalDump_=iConfig.getUntrackedParameter<bool>("fullEcalDump",false);
usesResource("TFileService");

h_eta = h_fs->make<TProfile>("iEta", "Eta vs iEta", 86*2*4, -86, 86, " " ) ;
h_phi = h_fs->make<TProfile>("iPhi", "Phi vs iPhi", 360*4, 1, 361, " " ) ;

Expand All @@ -72,32 +69,13 @@ SurveyToTransforms::SurveyToTransforms( const edm::ParameterSet& iConfig )
}
}


SurveyToTransforms::~SurveyToTransforms()
{

// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}


//
// member functions
//

// ------------ method called to produce the data ------------
void
SurveyToTransforms::analyze( const edm::Event& iEvent, const edm::EventSetup& iSetup )
{
using namespace edm;
//

edm::ESHandle<CaloGeometry> pG;
iSetup.get<CaloGeometryRecord>().get(pG);

pG->getSubdetectorGeometry( DetId::Ecal, EcalEndcap ) ;
}

//define this as a plug-in

DEFINE_FWK_MODULE(SurveyToTransforms);

0 comments on commit ee0db90

Please sign in to comment.