Skip to content

Commit

Permalink
applied code checks, format
Browse files Browse the repository at this point in the history
  • Loading branch information
civanch committed Jul 24, 2019
1 parent 3e57ba7 commit 53fbbfe
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 115 deletions.
5 changes: 2 additions & 3 deletions SimG4Core/Application/src/RunManager.cc
Expand Up @@ -124,7 +124,7 @@ RunManager::RunManager(edm::ParameterSet const& p, edm::ConsumesCollector&& iC)
m_PhysicsTablesDir(p.getParameter<std::string>("PhysicsTablesDirectory")),
m_StorePhysicsTables(p.getParameter<bool>("StorePhysicsTables")),
m_RestorePhysicsTables(p.getParameter<bool>("RestorePhysicsTables")),
m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity",0)),
m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity", 0)),
m_pField(p.getParameter<edm::ParameterSet>("MagneticField")),
m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
Expand Down Expand Up @@ -187,8 +187,7 @@ void RunManager::initG4(const edm::EventSetup& es) {
bool geoFromDD4hep = m_p.getParameter<bool>("g4GeometryDD4hepSource");
bool cuts = m_pPhysics.getParameter<bool>("CutsPerRegion");
bool protonCut = m_pPhysics.getParameter<bool>("CutsOnProton");
int verb = std::max(m_pPhysics.getParameter<int>("Verbosity"),
m_p.getParameter<int>("SteppingVerbosity"));
int verb = std::max(m_pPhysics.getParameter<int>("Verbosity"), m_p.getParameter<int>("SteppingVerbosity"));
edm::LogVerbatim("SimG4CoreApplication")
<< "RunManagerMT: start initialising of geometry DD4Hep: " << geoFromDD4hep << "\n"
<< " cutsPerRegion: " << cuts << " cutForProton: " << protonCut << "\n"
Expand Down
6 changes: 4 additions & 2 deletions SimG4Core/Application/src/RunManagerMT.cc
Expand Up @@ -99,7 +99,7 @@ void RunManagerMT::initG4(const DDCompactView* pDD,
bool cuts = m_pPhysics.getParameter<bool>("CutsPerRegion");
bool protonCut = m_pPhysics.getParameter<bool>("CutsOnProton");
int verb =
std::max(m_pPhysics.getUntrackedParameter<int>("Verbosity",0), m_p.getParameter<int>("SteppingVerbosity"));
std::max(m_pPhysics.getUntrackedParameter<int>("Verbosity", 0), m_p.getParameter<int>("SteppingVerbosity"));
edm::LogVerbatim("SimG4CoreApplication")
<< "RunManagerMT: start initialising of geometry DD4Hep: " << geoFromDD4hep << "\n"
<< " cutsPerRegion: " << cuts << " cutForProton: " << protonCut << "\n"
Expand All @@ -121,7 +121,9 @@ void RunManagerMT::initG4(const DDCompactView* pDD,
edm::LogVerbatim("SimG4CoreApplication")
<< "###RunManagerMT: " << numPV << " PhysVolumes; " << numLV << " LogVolumes; " << nn << " Regions.";

if (m_check) { m_kernel->SetVerboseLevel(2); }
if (m_check) {
m_kernel->SetVerboseLevel(2);
}
m_kernel->DefineWorldVolume(world, true);
m_registry.dddWorldSignal_(m_world.get());

Expand Down
11 changes: 5 additions & 6 deletions SimG4Core/Application/src/RunManagerMTWorker.cc
Expand Up @@ -152,7 +152,7 @@ RunManagerMTWorker::RunManagerMTWorker(const edm::ParameterSet& iConfig, edm::Co
iC.consumes<edm::LHCTransportLinkContainer>(iConfig.getParameter<edm::InputTag>("theLHCTlinkTag"))),
m_nonBeam(iConfig.getParameter<bool>("NonBeamEvent")),
m_pUseMagneticField(iConfig.getParameter<bool>("UseMagneticField")),
m_EvtMgrVerbosity(iConfig.getUntrackedParameter<int>("G4EventManagerVerbosity",0)),
m_EvtMgrVerbosity(iConfig.getUntrackedParameter<int>("G4EventManagerVerbosity", 0)),
m_pField(iConfig.getParameter<edm::ParameterSet>("MagneticField")),
m_pRunAction(iConfig.getParameter<edm::ParameterSet>("RunAction")),
m_pEventAction(iConfig.getParameter<edm::ParameterSet>("EventAction")),
Expand Down Expand Up @@ -255,11 +255,11 @@ void RunManagerMTWorker::initializeThread(RunManagerMT& runManagerMaster, const
if (uitype == "MessageLogger") {
m_tls->UIsession.reset(new CustomUIsession());
} else if (uitype == "MessageLoggerThreadPrefix") {
m_tls->UIsession.reset(
new CustomUIsessionThreadPrefix(m_pCustomUIsession.getUntrackedParameter<std::string>("ThreadPrefix",""), thisID));
m_tls->UIsession.reset(new CustomUIsessionThreadPrefix(
m_pCustomUIsession.getUntrackedParameter<std::string>("ThreadPrefix", ""), thisID));
} else if (uitype == "FilePerThread") {
m_tls->UIsession.reset(
new CustomUIsessionToFile(m_pCustomUIsession.getUntrackedParameter<std::string>("ThreadFile",""), thisID));
new CustomUIsessionToFile(m_pCustomUIsession.getUntrackedParameter<std::string>("ThreadFile", ""), thisID));
} else {
throw edm::Exception(edm::errors::Configuration)
<< "Invalid value of CustomUIsession.Type '" << uitype
Expand Down Expand Up @@ -303,8 +303,7 @@ void RunManagerMTWorker::initializeThread(RunManagerMT& runManagerMaster, const
if (!fieldFile.empty()) {
std::call_once(applyOnce, []() { dumpMF = true; });
if (dumpMF) {
edm::LogVerbatim("SimG4CoreApplication")
<< " RunManagerMTWorker: Dump magnetic field to file " << fieldFile;
edm::LogVerbatim("SimG4CoreApplication") << " RunManagerMTWorker: Dump magnetic field to file " << fieldFile;
DumpMagneticField(tM->GetFieldManager()->GetDetectorField(), fieldFile);
}
}
Expand Down
6 changes: 2 additions & 4 deletions SimG4Core/Geometry/interface/CMSG4CheckOverlap.h
Expand Up @@ -10,15 +10,13 @@ class G4VPhysicalVolume;

class CMSG4CheckOverlap {
public:
CMSG4CheckOverlap(edm::ParameterSet const &p, std::string& regFile,
CustomUIsession*, G4VPhysicalVolume* world);
CMSG4CheckOverlap(edm::ParameterSet const& p, std::string& regFile, CustomUIsession*, G4VPhysicalVolume* world);
~CMSG4CheckOverlap();

private:
void makeReportForMaterials(std::ofstream& fout);
void makeReportForGeometry(std::ofstream& fout, G4VPhysicalVolume* world);
void makeReportForOverlaps(std::ofstream& fout, const edm::ParameterSet &p);

void makeReportForOverlaps(std::ofstream& fout, const edm::ParameterSet& p);
};

#endif

0 comments on commit 53fbbfe

Please sign in to comment.