Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: All headers in src/libraries/JANA use #pragma once #308

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/libraries/JANA/CLI/JBenchmarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef JANA2_JBENCHMARKER_H
#define JANA2_JBENCHMARKER_H

#pragma once
#include <JANA/JApplication.h>

class JBenchmarker {
Expand All @@ -29,4 +27,3 @@ class JBenchmarker {
};


#endif //JANA2_JBENCHMARKER_H
6 changes: 1 addition & 5 deletions src/libraries/JANA/CLI/JMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.


#ifndef JANA2_JMAIN_H
#define JANA2_JMAIN_H

#pragma once
#include <JANA/JApplication.h>

namespace jana {
Expand All @@ -32,4 +29,3 @@ int Execute(JApplication* app, UserOptions& options);

}

#endif //JANA2_JMAIN_H
5 changes: 1 addition & 4 deletions src/libraries/JANA/CLI/JVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef _JVersion_h_
#define _JVersion_h_

#pragma once
#include <sstream>

struct JVersion {
Expand Down Expand Up @@ -54,5 +52,4 @@ struct JVersion {
#define JVERSION_COMMIT_DATE "@JVERSION_COMMIT_DATE@"
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"

#endif // _JVersion_h_

6 changes: 1 addition & 5 deletions src/libraries/JANA/Calibrations/JCalibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef _JCalibration_
#define _JCalibration_

#pragma once
#include <JANA/JException.h>

#include <typeinfo>
Expand Down Expand Up @@ -613,5 +611,3 @@ JCalibration::containerType_t JCalibration::TrycontainerType(string typeid_name)
return kUnknownType;
}

#endif // _JCalibration_

4 changes: 1 addition & 3 deletions src/libraries/JANA/Calibrations/JCalibrationCCDB.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef _JCalibrationCCDB_
#define _JCalibrationCCDB_
#pragma once

// This entire file was copied from the CCDB 0.06 source
// (janaccdb directory). It has been modified based on
Expand Down Expand Up @@ -363,4 +362,3 @@ class JCalibrationCCDB : public JCalibration {
};


#endif // _JCalibrationCCDB_
6 changes: 1 addition & 5 deletions src/libraries/JANA/Calibrations/JCalibrationFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef _JCalibrationFile_
#define _JCalibrationFile_

#pragma once
#include "JCalibration.h"

#include <fstream>
Expand Down Expand Up @@ -38,5 +36,3 @@ class JCalibrationFile:public JCalibration{
};


#endif // _JCalibrationFile_

5 changes: 1 addition & 4 deletions src/libraries/JANA/Calibrations/JCalibrationGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef _JCalibrationGenerator_
#define _JCalibrationGenerator_

#pragma once
#include <stdint.h>
#include <string>

Expand Down Expand Up @@ -50,5 +48,4 @@ class JCalibrationGenerator{

};

#endif // _JCalibrationGenerator_

4 changes: 1 addition & 3 deletions src/libraries/JANA/Calibrations/JCalibrationGeneratorCCDB.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef JCalibrationGeneratorCCDB_h__
#define JCalibrationGeneratorCCDB_h__
#pragma once

// This entire file was copied from the CCDB 0.06 source
// (janaccdb directory). The only modification was to wrap
Expand Down Expand Up @@ -101,5 +100,4 @@

#endif // HAVE_CCDB

#endif // JCalibrationGeneratorCCDB_h__

6 changes: 1 addition & 5 deletions src/libraries/JANA/Calibrations/JCalibrationManager.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef JANA2_JCALIBRATIONMANAGER_H
#define JANA2_JCALIBRATIONMANAGER_H

#pragma once
#include <JANA/Calibrations/JCalibration.h>
#include <JANA/Calibrations/JCalibrationFile.h>
#include <JANA/Calibrations/JCalibrationGenerator.h>
Expand Down Expand Up @@ -221,6 +219,4 @@ class JCalibrationManager : public JService {
}
};

#endif //JANA2_JCALIBRATIONMANAGER_H


6 changes: 1 addition & 5 deletions src/libraries/JANA/Calibrations/JLargeCalibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
// Creator: davidl (on Darwin eleanor.jlab.org 12.2.0 i386)
//

#ifndef _JLargeCalibration_
#define _JLargeCalibration_

#pragma once
#include <string>

using std::string;
Expand Down Expand Up @@ -173,5 +171,3 @@ bool JLargeCalibration::Get(string namepath, T &vals, int event_number) {
}


#endif // _JLargeCalibration_

5 changes: 1 addition & 4 deletions src/libraries/JANA/Compatibility/JGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
// Creator: davidl (on Darwin fwing-dhcp61.jlab.org 8.10.1 i386)
//

#ifndef _JGeometry_
#define _JGeometry_

#pragma once
#include "jerror.h"

#include <map>
Expand Down Expand Up @@ -384,4 +382,3 @@ bool JGeometry::GetMultiple(string xpath, vector<map<string,T> > &vvals)
return res;
}

#endif // _JGeometry_
5 changes: 1 addition & 4 deletions src/libraries/JANA/Compatibility/JGeometryMYSQL.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
// Creator: davidl (on Darwin swire-d95.jlab.org 8.11.1 i386)
//

#ifndef _JGeometryMYSQL_
#define _JGeometryMYSQL_

#pragma once
#include <JANA/Compatibility/jerror.h>
#include <JANA/Compatibility/JGeometry.h>
//#include <JANA/jana_config.h>
Expand All @@ -32,5 +30,4 @@ class JGeometryMYSQL:public JGeometry{

};

#endif // _JGeometryMYSQL_

6 changes: 1 addition & 5 deletions src/libraries/JANA/Compatibility/JGeometryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.


#ifndef JANA2_JGEOMETRYMANAGER_H
#define JANA2_JGEOMETRYMANAGER_H

#pragma once
#include <JANA/Services/JServiceLocator.h>
#include <JANA/Compatibility/JGeometry.h>

Expand All @@ -23,4 +20,3 @@ class JGeometryManager: public JService {
};


#endif //JANA2_JGEOMETRYMANAGER_H
7 changes: 1 addition & 6 deletions src/libraries/JANA/Compatibility/JGeometryXML.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
// Creator: davidl
//

#ifndef _JGeometryXML_
#define _JGeometryXML_

#pragma once
#include <iostream>

#include <JANA/Compatibility/jerror.h>
Expand Down Expand Up @@ -200,6 +198,3 @@ typedef JGeometryXML::node_t node_t;
#endif



#endif // _JGeometryXML_

7 changes: 1 addition & 6 deletions src/libraries/JANA/Compatibility/JGetObjectsFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.


#ifndef JANA2_JGETOBJECTSFACTORY_H
#define JANA2_JGETOBJECTSFACTORY_H


#pragma once
#include <JANA/JEvent.h>
#include <JANA/JEventSource.h>

Expand Down Expand Up @@ -34,4 +30,3 @@ class JGetObjectsFactory : public JFactoryT<T> {
}

};
#endif //JANA2_JGETOBJECTSFACTORY_H
6 changes: 1 addition & 5 deletions src/libraries/JANA/Compatibility/JLockService.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.


#ifndef JANA2_JLOCKSERVICE_H
#define JANA2_JLOCKSERVICE_H

#pragma once
#include <JANA/Services/JServiceLocator.h>

class JEventProcessor;
Expand Down Expand Up @@ -273,4 +270,3 @@ inline pthread_rwlock_t *JLockService::RootFillUnLock(JEventProcessor *proc) {
}


#endif //JANA2_JLOCKSERVICE_H
4 changes: 1 addition & 3 deletions src/libraries/JANA/Compatibility/JStatusBits.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Created by Nathan Brei on 6/18/20.
//

#ifndef JANA2_JSTATUSBITS_H
#define JANA2_JSTATUSBITS_H
#pragma once

#include <map>
#include <mutex>
Expand Down Expand Up @@ -173,4 +172,3 @@ template <typename T>
std::map<uint32_t, std::string> JStatusBits<T>::m_status_bit_descriptions;


#endif //JANA2_JSTATUSBITS_H
6 changes: 1 addition & 5 deletions src/libraries/JANA/Compatibility/JStreamLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
// obscure protected-member rules.
//*************************************************************


#ifndef _DSTREAMLOG_H_
#define _DSTREAMLOG_H_

#pragma once
#include <iostream>
#include <fstream>
#include <string>
Expand Down Expand Up @@ -65,4 +62,3 @@ extern JStreamLog jout;
extern JStreamLog jerr;
#define jendl std::endl

#endif //_DSTREAMLOG_H_
5 changes: 1 addition & 4 deletions src/libraries/JANA/Compatibility/JStreamLogBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
// obscure protected-member rules.
//*************************************************************

#ifndef _DSTREAMLOGBUFFER_H_
#define _DSTREAMLOGBUFFER_H_

#pragma once
#include <iostream>
#include <string.h>
#include <pthread.h>
Expand Down Expand Up @@ -62,4 +60,3 @@ class JStreamLogBuffer : public std::streambuf
void SetThreadstampFlag(bool prepend_threadstamp=true){__prepend_threadstamp=prepend_threadstamp;}
};

#endif //_DSTREAMLOGBUFFER_H_
6 changes: 1 addition & 5 deletions src/libraries/JANA/Compatibility/jerror.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
/// of type jerror_t. This header should be included in all
/// files which must deal with this type.


#ifndef _JERROR_H_
#define _JERROR_H_
#pragma once

#define _DBG_ std::cerr<<__FILE__<<":"<<__LINE__<<" "
#define _DBG__ std::cerr<<__FILE__<<":"<<__LINE__<<std::endl
Expand Down Expand Up @@ -43,5 +41,3 @@ enum jerror_t{
#include <JANA/Compatibility/cint.h>


#endif //_JERROR_H_

5 changes: 1 addition & 4 deletions src/libraries/JANA/Engine/JArrowProcessingController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Copyright 2020, Jefferson Science Associates, LLC.
// Subject to the terms in the LICENSE file found in the top-level directory.

#ifndef JANA2_JARROWPROCESSINGCONTROLLER_H
#define JANA2_JARROWPROCESSINGCONTROLLER_H

#pragma once

#include <JANA/Topology/JTopologyBuilder.h>
#include <JANA/Engine/JWorker.h>
Expand Down Expand Up @@ -59,4 +57,3 @@ class JArrowProcessingController : public JService {

};

#endif //JANA2_JARROWPROCESSINGCONTROLLER_H
5 changes: 1 addition & 4 deletions src/libraries/JANA/Engine/JPerfMetrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// Subject to the terms in the LICENSE file found in the top-level directory.


#ifndef JANA2_JTOPOLOGYMETRICS_H
#define JANA2_JTOPOLOGYMETRICS_H

#pragma once
#include <chrono>
#include <mutex>
#include "JPerfSummary.h"
Expand Down Expand Up @@ -55,4 +53,3 @@ class JPerfMetrics {
};


#endif //JANA2_JTOPOLOGYMETRICS_H
6 changes: 1 addition & 5 deletions src/libraries/JANA/Engine/JPerfSummary.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
// Subject to the terms in the LICENSE file found in the top-level directory.


#ifndef JANA2_JARROWPERFSUMMARY_H
#define JANA2_JARROWPERFSUMMARY_H


#pragma once
#include <vector>
#include <string>

Expand Down Expand Up @@ -77,4 +74,3 @@ struct JPerfSummary {
std::ostream& operator<<(std::ostream& stream, const JPerfSummary& data);


#endif //JANA2_JARROWPERFSUMMARY_H
Loading
Loading