Skip to content

Commit

Permalink
RtsLoggingUpdate (#673)
Browse files Browse the repository at this point in the history
updates to allow RTS logging in Jevp while leaving it disabled in
general offline computing
  • Loading branch information
jml985 authored Apr 3, 2024
1 parent 2e09826 commit 267ec8e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 50 deletions.
5 changes: 4 additions & 1 deletion OnlTools/Jevp/level.source
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# STAR LEVEL for EVP code

starver SL23b
starver SL23c
#starver SL21b


unsetenv DB_SERVER_LOCAL_CONFIG
34 changes: 9 additions & 25 deletions StRoot/RTS/include/rtsLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,10 @@ void rtsLogAddJmlFile (char *fname);






#ifndef RTS_ENABLE_LOG

#define RTS_ASSERT(expr) assert(expr)
#define LOG(SEV,STRING,ARGS...)
#define rtsLogUnix_v(str, ...)
#define rtsLogAddCmd(x)


// the following become noops...
#define rtsLogLevel(x)
#define rtsLogAddDest(x,y)
#define rtsLogLevelInt(x)
#define rtsLogOutput(x)

#else /* RTS_ENABLE_LOG */

#endif

#ifdef __GNUC__
#define INLINE_HACK extern __inline__
Expand Down Expand Up @@ -182,7 +167,7 @@ INLINE_HACK void rtsLogLevel(const char *level)
#define sbLOG(args...)
#endif


#ifdef RTS_ENABLE_LOG
#define LOG(SEV,STRING,A1,A2,A3,A4,A5) \
do { \
const char *const yada = SEV ; \
Expand All @@ -195,15 +180,17 @@ INLINE_HACK void rtsLogLevel(const char *level)
logMsg((char *)"" SEV ": " __FILE__ " [line %d]: " STRING "\n",__LINE__,(unsigned int)A1,(unsigned int)A2,(unsigned int)A3,(unsigned int)A4,(unsigned int)A5) ; \
sbLOG((char *)"" SEV ": " __FILE__ " [line %d]: " STRING "\n",__LINE__,(unsigned int)A1,(unsigned int)A2,(unsigned int)A3,(unsigned int)A4,(unsigned int)A5) ; \
} \
} while(0) \
} while(0)

#endif // RTS_ENABLE_LOG

#define rtsLogOutput(x)

#else /* unix */

#ifdef RTS_ENABLE_LOG
#define RTS_ASSERT(expr) LOG(CRIT,"assert(%s) true -- certain death follows",__STRING(expr))

#endif
extern int rtsLogUnix_v(const char *str, ...) ;

extern int rtsLogOutput(int flag) ;
Expand All @@ -212,6 +199,7 @@ INLINE_HACK void rtsLogLevel(const char *level)

extern int rtsLogAddFile(char *fname) ;

#ifdef RTS_ENABLE_LOG
#ifdef RTS_LOG_COLORED

#define LOG(SEV,STRING,ARGS...) \
Expand Down Expand Up @@ -242,16 +230,12 @@ INLINE_HACK void rtsLogLevel(const char *level)
} while(0) \



#endif /* RTS_LOG_COLORED */

#endif /* ENABLE LOG */
#endif /* __vxworks */


#endif /* RTS_ENABLE_LOG */

#ifdef __cplusplus
}
#endif
#endif /* __cplusplus */

#endif /* _RTS_LOG_H */
22 changes: 0 additions & 22 deletions StRoot/RTS/src/LOG/rtsLogUnix.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,6 @@ volatile int tonkoLogLevel = 2 ;






#ifdef RTS_ENABLE_LOG
#warning "DAQ logging is enabled"
#ifdef RTS_LOG_DEFAULT_NET
#warning "DAQ logging defaults to daqman"
#else
#warning "DAQ logging defaults to STDERR"
#endif /* RTS_LOG_DEFAULT_NET */
#else
#warning "DAQ logging is disabled"
#endif /* RTS_ENABLE_LOG */


#ifdef RTS_ENABLE_LOG

#ifdef RTS_LOG_DEFAULT_NET
static int output_flag = RTS_LOG_NET ;
#else
Expand Down Expand Up @@ -391,11 +374,6 @@ static const char *getCmd(void)
#endif
}


#endif



#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 3 additions & 2 deletions mgr/Conscript-standard
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ if ( $pkg eq "Jevp") {
. $main::PATH_SEPARATOR . "#OnlTools/Jevp/StJevpBuilders"
. $main::PATH_SEPARATOR . "#OnlTools/Jevp/StJevpViewer"
. $main::PATH_SEPARATOR . $CPPPATH;
$CPPFLAGS .= " -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_NO_DEBUG ";
$CPPFLAGS .= " -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_NO_DEBUG -DRTS_ENABLE_LOG ";

}

#$CPPFLAGS .= " -DNEW_DAQ_READER -D__NO_STRANGE_MUDST__ ";
Expand Down Expand Up @@ -1432,7 +1433,7 @@ if ( $#src > -1 ) {
}
}
if ($pkg eq "RTS") {
my $cppflags = "-DRTS_PROJECT_STAR -DTPXREADER -DRTS_LITTLE_ENDIAN";
my $cppflags = "-DRTS_PROJECT_STAR -DTPXREADER -DRTS_LITTLE_ENDIAN ";
my $cpppath = $main::PATH_SEPARATOR . "#StRoot/RTS/include"
. $main::PATH_SEPARATOR . "#StRoot/RTS/trg/include"
. $main::PATH_SEPARATOR . "#StRoot/RTS/include/TPC"
Expand Down

0 comments on commit 267ec8e

Please sign in to comment.